Re: [gtk-list] EventBox problem



On 30-Oct-97 Owen Taylor wrote:
> When there isn't an eventbox, the background is white, because the
> widgets (which don't have an X window) simply share the background
> of the parent. When there is an eventbox, you have to get trickier.
> 
> The window background color needs to be set at two points - when
> the window is initially realized (you can't do it when you create
> the widget, because the X window doesn't exist yet), and when
> the state of the list item changes. 

Thanks, seems to work, but I had to insert the lines

 if (widget->window == NULL)
     return;

at the beginning of event_box_state_changed() to avoid a warning.
Besides the focus of the event box isnīt drawn correctly (select
an item, press cursor down).

> Ryan Willhoit is working on a Grid widget, which should be
> useful for this sort of thing.

I am very interested in that ! ;)

Ciao,
  Stefan



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