Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Busselton, Western Australia, Australia
    Posts
    59
    Thanks
    1
    Thanked 2 Times in 2 Posts

    List (Combo) Box Help Please (XCEL 2000 SR1)

    Can anyone tell me how to change the column widths for eac column in a list box (or combo box) when the box has multiple columns? It appears that the property setting sheet only adjusts the width of the first column.
    I also want to display a header on the list box but I keep getting my list with the header in the select part of the box and not in the top "Header" section of the box. is this controlled via code settings or can I set it via the property sheet?
    Thanks in advance.
    Brian.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: List (Combo) Box Help Please (XCEL 2000 SR1)

    ColumnWidths: separate individual ones with semi-colon([img]/forums/images/smilies/wink.gif[/img]. Width is in pt or in (convert to pt: 72 pt/in)
    For example with 3 cols:
    ColumnWidths to 22 pt; 30 pt; 45 pt

    Headings: ColumnHeads to True adds header to box
    If you want it above the box, add the info in the cells above or on a form use labels

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Location
    Busselton, Western Australia, Australia
    Posts
    59
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Re: List (Combo) Box Help Please (XCEL 2000 SR1)

    Thanks for the info re column widths, just what I needed.
    As for the column header info...
    I have already set columnheads to true but when I run the form (which loads the information into the listbox) the first row of data is not put into the header row but into the first row of selectable data! [img]/forums/images/smilies/sad.gif[/img]
    This is why I think that I am loading the data incorrectly (I am using the additem method for loading the data into the listbox).
    Brian.

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: List (Combo) Box Help Please (XCEL 2000 SR1)

    You must set ColumnHeads to TRUE and you must use the "ListFillRange" Property or the "RowSource" Property. The Row ABOVE the range you specify is used as the Heading.

    If the top row of your range is row1, then it will use "Column A", "Column B", etc

  5. #5
    Star Lounger
    Join Date
    Apr 2002
    Location
    Busselton, Western Australia, Australia
    Posts
    59
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Re: List (Combo) Box Help Please (XCEL 2000 SR1)

    Thanks for the help you have provided!
    I finally got it to work by using the rowsource property rather than trying to loop thru all the rows and adding the information via additem.
    On to the next set of insects to squash! [img]/forums/images/smilies/smile.gif[/img]
    Regards
    Brian.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •