Re: GtkEntry ... change size

2013-10-28 Thread Michael Cronenworth

Mariano Gaudix wrote:

I can not  change the size to  GtkEntry  .  I am  using  Gtk 3.6 .
I need  a  GtkEntry  small  ,   for my   graphic   interface .


GTK expands widgets to fill space by default so setting widget size has no 
visible effect. You need to disable expansion.


I'll add a general disclaimer that you should not hard-code widget size unless 
you absolutely must. Allowing widgets to expand helps your app work on different 
screen sizes and shapes.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkEntry ... change size

2013-10-28 Thread Mariano Gaudix
¿ how I disable expansion ?
I used the sentences  .

gtk_widget_set_vexpand (GTK_WIDGET(entry ) , FALSE ) ;

gtk_widget_set_hexpand (GTK_WIDGET(entry ) , FALSE ) ;


But  these  sentencesdon't  run   .


2013/10/28 Michael Cronenworth m...@cchtml.com

 Mariano Gaudix wrote:

 I can not  change the size to  GtkEntry  .  I am  using  Gtk 3.6 .
 I need  a  GtkEntry  small  ,   for my   graphic   interface .


 GTK expands widgets to fill space by default so setting widget size has no
 visible effect. You need to disable expansion.

 I'll add a general disclaimer that you should not hard-code widget size
 unless you absolutely must. Allowing widgets to expand helps your app work
 on different screen sizes and shapes.
 __**_
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 https://mail.gnome.org/**mailman/listinfo/gtk-app-**devel-listhttps://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkEntry ... change size

2013-10-28 Thread Michael Cronenworth

Mariano Gaudix wrote:

¿ how I disable expansion ?
I used the sentences  .

gtk_widget_set_vexpand (GTK_WIDGET(entry ) , FALSE ) ;

gtk_widget_set_hexpand (GTK_WIDGET(entry ) , FALSE ) ;


But  these  sentencesdon't  run   .


I know those are the new GTK3 functions, but I still mainly use GTK2.

Try:
gtk_container_add( GTK_CONTAINER( hBox ), entry );
gtk_box_set_child_packing( GTK_BOX( hBox ), entry,
   FALSE, TRUE, 0, GTK_PACK_START );
gtk_widget_show( entry );

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkEntry ... change size

2013-10-28 Thread Michael Cronenworth

On 10/28/2013 08:55 PM, Mariano Gaudix wrote:

The GtkEntry continuous big .
gtk_box_set_child_packing( GTK_BOX( box ), entry,FALSE, TRUE, 0, GTK_PACK_START 
);

the sentence   don't work .


You need a widget adjacent to your entry to take up the space you don't want 
filled by your entry... (say a blank label widget)

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list