Announcement

Collapse
No announcement yet.

Aligning Text in List Box

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guest's Avatar
    Guest replied
    Note, neg. numbers (tab value) will make them right aligned..

    Leave a comment:


  • David L Morris
    replied
    This works:
    Redim tbs(5) as long

    After you create your ListBox, set your desired Tab stops per the example.

    'Set the tab positione in the list box
    tbs(0) = 40: tbs(1) = 70: tbs(2) = 100: tbs(3) = 160 : tbs(4) = 400: tbs(5) = 500 ' whatever..
    CONTROL SEND hDlg, %IDLIST, %LB_SETTABSTOPS, 5, VARPTR(tbs(0))

    I expect when you AddItems the items will contain tabs (CHR$(9)).


    Leave a comment:


  • Chuck de Young
    replied
    You can find quite a discussion of using TabStops in list boxes
    on this BBS. Use search for List and TabStop, and you should find
    all you need.

    Leave a comment:


  • Brent Boshart
    started a topic Aligning Text in List Box

    Aligning Text in List Box

    I have a listbox which contained people's names and dates of birth. How can I align then names and birthdates without using a fixed font?
Working...
X