Re: font size gtk_*_new_with_label

2008-07-12 Thread Luis Ariel Lecca
Hi Rui, thank you very much for your answer !

I have custom labels with my widgets...
Now, I'd rather change as less as possible the Glade code (Glade use 
_with_label in generation code).
I think that would be better using with_label than a custom button (I'm not 
completetly sure about it on gtk).

**
So, the conclusion is that the objects _with_label can't change their font 
size, is it? Could be any way of do it? 
**

Thank you Rui
Regards
Luis


--- El sáb 12-jul-08, Rui Tiago Cação Matos <[EMAIL PROTECTED]> escribió:
Fecha: sábado, 12 de julio de 2008, 9:05 am

On 12/07/2008, Luis Ariel Lecca <[EMAIL PROTECTED]> wrote:
> So how to get the reference pointer or directly how to change the font
size on these objects ?

Since GtkButtons are GtkContainers you could add a custom label to it like
this:

#include 

int
main (int argc, char **argv)
{
  GtkWidget *label, *button, *window;

  gtk_init (&argc, &argv);

  label = gtk_label_new ("");
  gtk_label_set_markup (GTK_LABEL (label),
"Label");
  button = gtk_button_new ();
  gtk_container_add (GTK_CONTAINER (button), label);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_add (GTK_CONTAINER (window), button);

  gtk_widget_show_all (window);

  gtk_main ();

  return 0;
}

Good luck,
Rui




  

¡Buscá desde tu celular!

Yahoo! oneSEARCH ahora está en Claro

http://ar.mobile.yahoo.com/onesearch
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: font size gtk_*_new_with_label

2008-07-12 Thread Rui Tiago Cação Matos
On 12/07/2008, Luis Ariel Lecca <[EMAIL PROTECTED]> wrote:
> So how to get the reference pointer or directly how to change the font size 
> on these objects ?

Since GtkButtons are GtkContainers you could add a custom label to it like this:

#include 

int
main (int argc, char **argv)
{
  GtkWidget *label, *button, *window;

  gtk_init (&argc, &argv);

  label = gtk_label_new ("");
  gtk_label_set_markup (GTK_LABEL (label),
"Label");
  button = gtk_button_new ();
  gtk_container_add (GTK_CONTAINER (button), label);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_add (GTK_CONTAINER (window), button);

  gtk_widget_show_all (window);

  gtk_main ();

  return 0;
}


Good luck,
Rui
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: font size gtk_*_new_with_label

2008-07-11 Thread Luis Ariel Lecca
Hi All ! Is it the right list to post my message ? I will appreciate very much 
any help :)

I'm using 
gtk_widget_modify_font()  and 

style = gtk_rc_style_new();
pango_font_description_free( style->font_desc );
style->font_desc = pfont;
gtk_widget_modify_style( widget, style );

to change the font size of my labels, but I can't do it on created
buttons with gtk_*_new_with_label() and neither in my statusbar.
 
I couldn't find any example on the net. I understand that I dont have the 
reference to the labels... , but when gtk refresh the screen needs the 
reference to the labels...
So how to get the reference pointer or directly how to change the font size on 
these objects ?
 
could any body give me some help about this problem? I need to solve it

Thanks in advance, Regards
Luis



  

¡Buscá desde tu celular!

Yahoo! oneSEARCH ahora está en Claro

http://ar.mobile.yahoo.com/onesearch___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list