Announcement

Collapse
No announcement yet.

Aligning Text in List Box

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

  • 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?
    Brent Boshart

  • #2
    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.

    Comment


    • #3
      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)).


      Comment


      • #4
        Note, neg. numbers (tab value) will make them right aligned..

        Comment

        Working...
        X