 |
shahidmojid Level: Professor
 Registered: 09-05-2002 Posts: 85
|
two columns in Combo Box Archived to Disk
Hi all,
Can someone tell me, how to show two columns in a combo box?
Please help!
|
|
10-07-2002 at 09:46 PM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1617
|
Re: two columns in Combo Box Archived to Disk
As far as I know, It's not possible. [May be some API with subclassing that could do it, but then I'd think it'd resemble a listbox more than a combo box.]
You could always create your own custom control, or just put two combo boxes one for the first col, one second.
|
|
10-07-2002 at 09:55 PM |
|
|
shahidmojid Level: Professor
 Registered: 09-05-2002 Posts: 85
|
Re: two columns in Combo Box Archived to Disk
Thanks JL. You saved my time.
Bye the way, can you please tell me how to add 4 colums in a list box and add data into it?
Me.List1.Columns = 4
Me.List1.AddItem rst![name], 0
but how can i write to the second column. Please help.
|
|
11-07-2002 at 08:26 AM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1617
|
Re: two columns in Combo Box Archived to Disk
As far as I know, it too isn't possible (directly, like by an option). The only way to on pursose put it in a different column is to add a "blank" in the list (add " "). Then you'd have to test for your "blank" spot since the control assumes it to be a valid entry.
It only uses the columns if the items in the list couldn't be shown without a vertical scroll bar.
IE: If you have a listbox, 4 items tall with 8 items, for 1 col, it'd have a list with a scrollbar. 2 cols, it'd have two columns with 4 per col.
Offhand, you may have better use from a Grid (Flex grid), it'd allow you to put info into any column you want, although it may not be feasible in your situation.
|
|
11-07-2002 at 05:51 PM |
|
|
shahidmojid Level: Professor
 Registered: 09-05-2002 Posts: 85
|
Re: two columns in Combo Box Archived to Disk
Thanks a lot JL for all of ur help. You are so helpful.
Thanks
|
|
11-07-2002 at 06:58 PM |
|
|
|
|
 |
 |