Re: Thanks help me please



parakala suma wrote:

Hi
Thanks for your help. Kindly tell me how can i change
font size in label wigdet and background color for
label and text widgets How can we attach pictures(images to label or text or
buttons)
please help me .
thanking you
suma


you change fonts by creating and attaching new GtkStyle objects (with various font properties) to the widgets in question. (at least, that's how it works in Gtk-1.x. Gtk-2.x has different font handling.)

in general, changing colors is a bad idea (the themes are supposed to do that), but if you really have to, that's a GtkStyle property, too.

to add an image to a button (a la gnome stock buttons or borland builder buttons), create a container widget, pack an image and a label into it, and add the container to the button.

the GtkLabel is specifically for text, so you can't attach an image to it. you'll have to create a container and pack an image and a label into it.


without more specifics on what you're trying to do, i can't tell you much more.


for more in-depth information:

havoc pennington's "GTK+/Gnome Application Development" (for Gtk-1.x
   http://developer.gnome.org/doc/GGAD/

several Gtk/Gnome tutorials (mostly for Gtk-2.x):
   http://developer.gnome.org/doc/tutorials/

(these are written as docs for the C libraries, the all the principles apply to the perl bindings)




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