Re: change font size on of the label
- From: Paul Davis <pbd Op Net>
- To: netlu visto com
- Cc: gtk-list gnome org
- Subject: Re: change font size on of the label
- Date: Sat, 29 Sep 2001 17:35:58 -0400
> I have created a button with a lable on it.
>I just would like to change the font size (even the type)
>of the text on the label.
>My questions are may I do it by coding? and what function
>call is that?
gtk_widget_set_name (button, "name_for_button");
then in a GTK RC file:
style "style for button {
font = "your font specification"
}
widget "*name_for_button*" style "style_for_button"
then load the RC file. either make it ~/.gtkrc, or use
gtk_rc_parse(). Note that the last asterisk on the widget name is
necessary because the label is a child of the button. you could do it
more directly with:
gtk_widget_set_name (label, "name_for_button");
then in a GTK RC file:
style "style for label {
font = "your font specification"
}
widget "*name_for_label" style "style_for_label"
Please don't try to do this via hard-coding. Your users (and even you)
will regret it later.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]