Re: [INIMSS] Which is the best place to initialize widgets in a window.



>Which is the best event handler to be used for initializing the widgets
>in a window, (to load data into it).

the expose event is where the widget gets drawn, so that would be the
obvious place. just do your stuff, and return FALSE. the regular
drawing code will then happen as expected, using your data.

i sometimes use map_event for widgets that need to be rebuilt every
time they are "mapped" (XWindow terminology for the step of taking the
X server data structure for a window and making its contents appear on
a display). however, in general, i think you should be using the
expose event.

--p



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