Re: Making a custom widget scrollable



I still couldn't get my widget to become scrollable, even with your suggestions, so I Googled around a bit more and came upon a solution. Someone mentioned that I should add a call to set_size_request() after I finish drawing the widget, with the proper measurements. I tried that out, and now Gtk::ScrolledWindow (and others) works nicely with my widget.
 
Thanks for your time!

 
2005/9/28, Surya Kiran Gullapalli <skg fluent co in>:
KanadaKid wrote:

> Hi, I'm having some difficulty getting my custom drawn widget (using a
> derived Gtk::DrawingArea) to be scrollable.
>
> The DrawingArea itself only draws a plain grid (the size varies based
> on the amount of rows and columns requested), and sometimes that grid
> obviously becomes too big to display at once, so scrolling
> functionality is necessary. However, I'm not sure as to how I would
> implement scrolling. I already tried added the widget to a
> ScrolledWindow, but apparently that didn't work.
>
> Any ideas? Thanks in advance.

How about Gtk::Layout ??

Surya




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