Announcement

Collapse
No announcement yet.

List Box Tabs

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

  • List Box Tabs

    I'm currently using the statement below to set up a list to show & or select items that I have entered into a file gEntries is a UDT. Now I am interested in using the %LBS_MUTICOLUMN &
    %LB_SETCOLUMNWIDTH for making the entries more readable in the list box.

    CONTROL ADD LISTBOX, hDlg, %id_List, gEntries() , 10, 20, 380,180, %LBS_DISABLENOSCROLL OR % WS_TABSTOP OR %WS_GROUP OR %WS_VSCROLL OR %LBS_HASSTRINGS, % WS_EX_CLIENTEDGE

    Thanks Doug Miller

  • #2
    The trick here is to set the columns to the total Width in pixels,
    divided with the number of columns you want to have. The backside
    is that you'll get a list where the items are numbered vertically,
    like:
    Code:
     0  3  6
     1  4  7
     2  5  8
    This means it will be a bit tricky to show arrays of data that
    belongs together on the same line, so it's usually better to
    use %LB_SETTABSTOPS to rearrange items in columns instead and
    then insert a tab character - Chr$(9) - between each item. If
    you search these forums, I'm sure you'll find several examples
    of how to use %LB_SETTABSTOPS.

    (There are also some good samples of how to use the ListView for
    this purpose - the ListView is very good for viewing UDT data)


    ------------------

    Comment

    Working...
    X