Re: [gtkmm] gtkmm resources



On Fri, 2004-01-16 at 13:37, Luis Pastor Vegas wrote:
[snip]
> Ok. I have already learnt that I have to use the Gtk::RC class, and 
> reading the GTK+ documentation I am somewhat familiar to the resource 
> file format. I have created two styles in the gtkrc file, but only the 
> "default" style works. This is my gtkrc file:
> ----
> style "default" {
>     font_name = "Sans 14"
> }
> class "*" style "default"
> 
> style "my-label" {
>     font_name = "Sans Italic 10"
> }
> class "MyLabel" style "my-label"
  ^^^^^
> ----
> In the "MyLabel" constructor there is a call to set_name("MyLabel").
                                                      ^^^^
> What's wrong? I don't know how is the class path format that must be 
> specified in a gtkmm application, since the only documentation I have 
> found is for GTK+ applications. Can anybody send me a gtkrc example file?
> 
> Thank you very much.

In the RC file, you should use 
  widget "*.MyLabel" style "my-label"
as the "widget" declaration sets styles by widget *names*. 

HTH,
Tassos

-- 
Beware of he who would deny you access to information, for in his
heart he dreams himself your master." 
	-- Commissioner Pravin Lal, Sid Meier's Alpha Centauri




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