[Gambas-user] adjusting objects .width property in proportion to their .text property
Benoît Minisini
gambas at ...1...
Mon Mar 23 21:15:29 CET 2009
> I've always had this problem in gambas. Using gb.gtk
> I have buttons, textlabels and such objects on a form.
> My project is translatable, which means that the space needed for the
> their .text property is not always the same.
>
> Is there a way gambas could figure out exacly object's width needed to
> fit their .text property?
>
> FWIW, I've done just a bit of pygtk reading and practicing.. and in
> their case, the objects are always as wide as they need to be.. no
> need to adjust their .width property.
> Maybe gambas can implement something like that?
>
At the moment, you have to provide enough space to controls, and I agree this
is not the good way. Some controls (Label and TextLabel) have an AutoResize
property if you need them.
I will think about that. I don't like the wat QT and GTK+ behave (when buttons
do not have all the same size for example), and I want to find something
better. This will need some new containers...
Regards,
--
Benoît
More information about the User
mailing list