morgon has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to hack a script using Gtk2 but unfortunately I have very little understanding about Gtk (so it's mainly trial and error that I do), so sorry for maybe asking something trivial, but I did not find any clue in the man-pages.
What I want to do is to dynamically add and remove Gtk2::Buttons to a GTK2::VFrame.
My first question:
When I add a button at runtime via $vbox->add($button) the button does not become visible until I also do a $toplevel->show_all.
Is this the way to do it or is there a better way?
Second question:
When I add buttons and to a vframe and later remove one via $vbox->remove($button), the button disapears but the vframe keeps the previous height and the remaining buttons are resized to fill the available space.
What I want are buttons of a pre-determined size that never resize.
How can I do that?
Many thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: buttons in Gtk2
by Anonymous Monk on Jun 15, 2016 at 22:56 UTC | |
by morgon (Priest) on Jun 15, 2016 at 22:59 UTC | |
by Anonymous Monk on Jun 15, 2016 at 23:56 UTC | |
by morgon (Priest) on Jun 16, 2016 at 15:11 UTC | |
by Anonymous Monk on Jun 17, 2016 at 00:15 UTC |