Re: Could someone help me writing a new widget?



On Thu, 2004-01-08 at 06:28, Maurizio Colucci wrote:
Couldn't you just hide the widget until all the items have been added and
then show the widget once added? Saves a bunch of redrawing (or so I would
imagine).

The flicker is visible...

I believe there is a pair of gdk methods for toggling the
suppression/emission of expose events:

void gdk_window_freeze_updates (GdkWindow *window) ;
void gdk_window_thaw_updates (GdkWindow *window) ;

Now you can freeze updates, manipulate the CheckListBox to your liking,
then thaw updates (and maybe update, because it may be necessary).

And ... oh, look !

void gdk_window_process_updates (GdkWindow *window, gboolean
update_children) ;

The help for this function lists better scrolling behaviour as a reason
for using this function.

Have a look at

http://developer.gnome.org/doc/API/2.0/gdk/gdk-Windows.html#gdk-window-freeze-updates

Scroll down a bit for the gdk_window_process_updates stuff.




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