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

  • BiggyRat's Avatar

  • BiggyRat

  • 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's Avatar

  • lumberjack


  • Posts: 680
  • 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 02 Nov 2019 09:28 #11568

  • BiggyRat's Avatar

  • BiggyRat

  • 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's Avatar

  • Karl-Heinz


  • Posts: 545
  • 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's Avatar

  • FFF


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

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

    Alignment issue 02 Nov 2019 19:00 #11571

  • robert's Avatar

  • robert


  • Posts: 1676
  • 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's Avatar

  • BiggyRat

  • 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