[Gambas-user] TextWidth

Fabián Flores Vadell fabianfloresvadell at ...626...
Sat Sep 4 14:26:11 CEST 2010


2010/9/3 Benoît Minisini <gambas at ...1...>:
> I couldn't find a better solution than Doriano, because there is no easy way
> to know the size of a control border in Qt and GTK+.
>
> Moreover, I don't see the need of adjusting a TextBox to its contents, as
> usually this is an editable control, and so the user can enter any text in it.
> Or maybe you are doing something not usual with a TextBox? :-)
>
> --
> Benoît Minisini


Yes is unusual. An experiment derived of a little misunderstanding,
just for learn about.

The best solution that I found was:

txtSomeThing.Width = txtSomeThing.TextWidth(txtSomeThing.Text & "W")

-- 
Fabián Flores Vadell
www.speedbooksargentina.blogspot.com




More information about the User mailing list