[Sloved] Change Listbox list size
Posted
#1
(In Topic #695)
Enthusiast

Can someone show me please how I can display 2 line to in a List box?
I can do the Chr(10) & chr(13) but when it is added to the list some of the top and bottom of the text is missing (it looks like the list section has not expanded enough to allow the 2 lines see example)
<IMG src="https://www.algpos.co.uk/webimage/2lineexample.png">
</IMG>
Posted
Regular

ListBox con due o più righe per item - Gambas-it.org - Wikipedia
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Posted
Enthusiast

Thank-you to everyone who has given me advice on this issues
<IMG src="https://www.algpos.co.uk/webimage/2lineexample-1.png">
</IMG>As you can see it works perfectly now
All I need to do is work out how to have spaces working
example
Dataline 1______________________________Message
Dataline 2
Dataline 3 This is longer __________________Message
the __ is the number of spaces needed to align the Message section
Posted
Enthusiast

Posted
Enthusiast

Posted
Expert

Code (gambas)
Returns a new string that left-aligns the characters in the original string by padding them on the right with a specified string pattern, for a specified total length.
<LIST>
- <LI>String is the string to pad.
Length is the final length in UTF-8 characters.
Pad is the string pattern used for padding. By default, a space is used.</LI>
See also: String.PadLeft
Cheers - Quin.
I code therefore I am
I code therefore I am
Posted
Regular

Code (gambas)
- ' int printf (const char *__restrict __format, ...)
- ' Write formatted output to stdout.
- printf("%-30s%1s\n", "Dataline 1", "Message...")
- printf("%-30s%1s\n", "Dataline 2", "Message...")
- printf("%-30s%1s", "Dataline 3 This is longer", "Message...")
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Guru

Posted
Enthusiast

do you know how quick it would be to try it for yourself and see?
I had a long post typed up in response to his post….. about strings or numbers and weather the numbers had decimals in them and weather the strings had multiple lines and weather posting to the screen or a printer that used postscript or a simple POS printer and several other things that I can't remember now …
and it ended with "Trial and Error"
and then I deleted it …. anyone posting here should have enough experience with programing that I don't need to tell them any of that
PS. and I may return and delete this post also
Posted
Enthusiast

1 guest and 0 members have just viewed this.

