fbpx
Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC: Alignment issue

Alignment issue 1 week 5 days ago #11566

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 228
Hi again... I'm having trouble where I have a method filling a Listbox, with the following code:

METHOD SMSList() Class Datawindow
LOCAL i
LOCAL aRay as ARRAY
LOCAL cStr
LOCAL dbClients as DBSERVER
dbClients := Regos{}
dbClients:GoTop()

aRay := {}

FOR i := 1 to dbClients:RECCOUNT
cStr := PadR(AllTrim(dbClients:FIELDGET(#REGNO)),20, CHR(32)) + " " + PadR(AllTrim(dbClients:FIELDGET(#SMS)),10, CHR(32))
AAdd(aRay, cStr)
dbClients:Skip()
next i

return aRay


Problem is, it looks like this:



How can I align it so they are in two straight columns please?
Attachments:

Please Log in or Create an account to join the conversation.

Alignment issue 1 week 5 days ago #11567

  lumberjack's Avatar lumberjack Offline Posts: 608
Set the font to a fixed width type e.g. Courier New
______________________
Johan Nel
George, South Africa

Please Log in or Create an account to join the conversation.

Alignment issue 1 week 5 days ago #11568

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 228
Brilliant, thank you Sir. I suspected it would be something simple....

Please Log in or Create an account to join the conversation.

Alignment issue 1 week 5 days ago #11569

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 390
Hi Jeff,

The listbox class has the method SetTabs(aTabs), so thereĀ“s no reason to switch to a fixed-width font. To make SetTabs() work:

- set the Listbox painter property "Use Tab Stops" to true
- insert a tab char in your string
- set the tab position.

cStr := AllTrim(dbClients:FIELDGET(#REGNO)) + chr(9) + AllTrim(dbClients:FIELDGET(#SMS))

<oLB>:SetTabs ( { 90} ) increase/decrease the position until it fits your needs.

regards
Karl-Heinz

Please Log in or Create an account to join the conversation.

Alignment issue 1 week 4 days ago #11570

  FFF's Avatar FFF Offline Posts: 738
Cool!
Unfortunately, Vo-Help does't list this method... X#-Help does ;-)
Regards
Karl

Please Log in or Create an account to join the conversation.

Alignment issue 1 week 4 days ago #11571

  robert's Avatar robert Offline Posts: 1309
Karl,
The X# help is generated from the assemblies and that means that all methods are included unless we explicitely tell the the doc generator to skip a method.

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

Alignment issue 1 week 4 days ago #11572

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 228
Thank you very much Karl-Heinz, that worked brilliantly, and looks much nicer.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1