Re: Widget style property from RC file.

On 6/8/06, Murray Cumming <murrayc murrayc com> wrote:
Could someone point out what I'm doing wrong in the attached test case?
It's meant to read a value from the rc file, to determine how a widget
would be drawn, making the widget themed.

I get this output:

example button gtype name=ExampleButton
example_button_class_init(): Registering example_thing style property.
example_button_init(): example_thing from rc file=0

Instance init is too early to get style properties (though I suppose
you could call gtk_widget_ensure_style there), you need to wait until
'style-set' is called. You should implement the style-set default
handler anyway to work with theme changes.

Unless you change widget hierarchies based on the style property it
should be enough to access the property in size-request, size-allocate
and expose.

Tommi Komulainen                                 tommi komulainen iki fi

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