[Gambas-user] Format Text
Stefan Miefert
smiefert at ...784...
Thu Apr 23 19:25:56 CEST 2009
Hello,
i try your version included "string.len ...
but it dosent run when I have äöü inside.
I always get "bad arguments"
-----Ursprüngliche Nachricht-----
Von: Rolf-Werner Eilert [mailto:eilert-sprachen at ...221...]
Gesendet: Donnerstag, 23. April 2009 18:04
An: mailing list for gambas users
Betreff: Re: [Gambas-user] Format Text
Hi Stefan,
Stefan Miefert schrieb:
> Istn very smart but i do something like this now
>
>
>
>
> "Test" & space(30 - len("Test)) & "Alles how I can"
Not very smart? Hm. This would be just my solution.
>
> But how can I align something like number like this
>
> 22.55
> 1.22
> 133.22
>
> Must be like this
>
> 22.55
> 1.22
> 133.22
Just do it the other way round. If txt$ contains the text:
space(30 - len(txt$)) & txt$
or better (if umlauts are contained)
space(30 - string.len(txt$)) & txt$
That should do it... at least if you use Courier. For proportional
fonts, you will want to use a drawing space like Printer or DrawingArea
and work with measures of text lengths etc. That's quite another world,
though it's basically the same way of grouping the columns.
Rolf
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list