Can't load custom style property from rc file?



Dear all,

When I write a custom widget and add a custom property, for example, a
string:

gtk_widget_class_install_style_property (widget_class,
               g_param_spec_string ("test-style",
                       "NULL",
                       "NULL",
                       "Test style string,
                       G_PARAM_READABLE));

After that, in the resource file, the style I wrote:

style "default"
{
       CustomWidget::test-style = "Test style string in rc file"
}

class "*" style "default"

But when I get style property by:

char *style_string = NULL;

gtk_widget_style_get (GTK_WIDGET (custom_widget), "test-style",
&style_string, NULL);

style_string always return the default string.

Is there any method to check the style property is load currectly? Please
give me some advice.

Thanks a lot.



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