[Gambas-user] String and textboxes

k p mx4eva at ...626...
Tue Mar 8 20:11:15 CET 2011


> When doing the following:
> TextLabel1.Text = "i"&  TextBox1.Text&  "   "&  "  iEQU"&  "   "&  "0"
>
> I expect a string in a text box, which I get.
> However the length of the spacing stays the same no matter how many spaces
I
> put between the "   "
>
> What I'm trying to achieve is that the output string follows my coding
> standard.
> Ie if I write Callbutton in TextBox1, then the output shows
> "iCallbutton      iEQU      0"
>
> What am I doing wrong ?
>
> Kim


I'm not sure what you exactly do here in your program, but your example
above consists of string constants. You would have to vary the number of
spaces according to the length of the strings in TextBox1.Text, such as

space$(20 - string.len(TextBox1.Text))

to give just an example for UTF-8.

Or did I get you completely wrong here?

Regards

Rolf



What is happening is that white spaces does NOT change in the output
textbox, no matter how many white spaces I put in between the "   ".
Ie " " and "            " produces the same output in the text box.

So I get the following
"iCallbutton iEQU 0"

When I would expect this
"iCallbutton      iEQU      0"

Hmm

Kim



More information about the User mailing list