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 02 Nov 2019 08:32 #11566

  • BiggyRat
  • BiggyRat's Avatar
  • Topic Author



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 02 Nov 2019 09:04 #11567

  • lumberjack
  • lumberjack's Avatar


  • Posts: 721
  • Set the font to a fixed width type e.g. Courier New
    ______________________
    Johan Nel
    Boshof, South Africa

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

    Alignment issue 02 Nov 2019 09:28 #11568

    • BiggyRat
    • BiggyRat's Avatar
    • Topic Author



    Brilliant, thank you Sir. I suspected it would be something simple....

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

    Alignment issue 02 Nov 2019 12:10 #11569

    • Karl-Heinz
    • Karl-Heinz's Avatar


  • Posts: 774
  • 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 02 Nov 2019 18:20 #11570

    • FFF
    • FFF's Avatar


  • Posts: 1419
  • Cool!
    Unfortunately, Vo-Help does't list this method... X#-Help does ;-)
    Regards
    Karl (X# 2.15.0.3; Xide 2.15; W8.1/64 German)

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

    Alignment issue 02 Nov 2019 19:00 #11571

    • robert
    • robert's Avatar


  • Posts: 3595
  • 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 03 Nov 2019 01:25 #11572

    • BiggyRat
    • BiggyRat's Avatar
    • Topic Author



    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