[Gambas-user] TextWidth

Benoît Minisini gambas at ...1...
Sat Sep 4 15:22:03 CEST 2010


> 2010/9/4 Benoît Minisini <gambas at ...1...>:
> >> The best solution that I found was:
> >> 
> >> txtSomeThing.Width = txtSomeThing.TextWidth(txtSomeThing.Text & "W")
> > 
> > This is not a solution, as the width of the border is not related to the
> > width of the "W" character at all.
> 
> I know that, but it works much better than "+N". However Is ugly and
> fallible too.

Alas it depends on the widget theme. For example, the Oxygen KDE style has a 
very big inside margin for textboxes, so you must add more space!

-- 
Benoît Minisini




More information about the User mailing list