Re: Developing custom widget without scrolled window



2013/6/20 niwedita burnwal <navy035 gmail com>
Hi,
I am creating a custom widget for Log viewing in which I have added one table (with no of columns). The table is to have so many entries such that it will exceed the screen size. But to view the entries which are not visible in the screen we dont have to use scrolled window, instead we have to use two buttons, one at the top and another at the bottom. And we have to implement the functionality so that on click of top button the entries will move up and on click of bottom button viceversa. Although with adjustment I am able to do this but I need a particular size of the table to be visible on the screen.. which I am not able to set. Could anyone help?

Thanks,
navy035

Hello,

Overriding gtk_widget_get_preferred_width() and gtk_widget_get_preferred_height () should allow you to set the minimum and natural size of your widget.

By connecting the signal "size-allocate", on your widget, you can set GtkAdjusment



You can change programmaticaly the minimal size of a widget using gtk_widget_set_size_request()

Take a look : https://developer.gnome.org/gtk3/3.7/GtkTreeView.html#GtkTreeView.description

Hoping help you,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]