Re: GtkEntry



really gtk :: entry, I wrote wrong.
I managed to solve by putting the entry within a frame and it is in a box. I added a box pointer in grid.attach. Thus the values ran set_width_chars decreasing the size of the Entry.

2016-01-28 14:42 GMT-03:00 Liomar da Hora <liomarhora gmail com>:
really gtk :: entry, I wrote wrong.
I managed to solve by putting the entry within a frame and it is in a box. I added a box pointer in grid.attach. Thus the values ran set_width_chars decreasing the size of the Entry.

2016-01-28 10:47 GMT-03:00 Kjell Ahlstedt <kjell ahlstedt bredband net>:
All cells in a column have the same width. You must tell the Gtk::Entry with max_width_char 5 that it shall not expand to fill the cell's width. You can do that by changing its halign property. For example
   myEntry.set_halign(Gtk::ALIGN_CENTER);

(You mention GtkEntry (gtk+) instead of Gtk::Entry (gtkmm). If you are coding in C, and not C++, you're on the wrong mailing list, and the way to set the halign property will be different.)

Kjell


Den 2016-01-27 kl. 18:52, skrev Liomar da Hora:
Hello guys,
I am inserting GtkEntry within a column of GtkGrid.
the first GtkEntry has max_width_char (30).
the second has max_width_char (5).
But the two are staying with size 30, despite being in different lines.
the second is on the width of the first in the same column.
How can I fix this?







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