Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Additem in Microsoft forms2 2.0 Combobox

Status
Not open for further replies.

JimmyK

Programmer
Sep 8, 2000
142
VN
Hi,
Please tell me how to use Additem to Microsoft forms2 2.0 Combobox which have 2 column
Thank in advance


Jimmy Le
nhan_tiags@yahoo.com
 
as far as I know, the combobox doesnt support multicolumn.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
What a wonderfull world - Louis armstrong
 
Hi Christiaan, thank for your instant reply. But Microsft Forms 2.0 ComboBox really supports multi column in VB 6.0. This code works fine in VB 6.0. Combobox1 is Microsoft Forms 2.0 ComboBox
Code:
ComboBox1.Clear
ComboBox1.Width = 4580
ComboBox1.ColumnCount = 2 
ComboBox1.ListWidth = "8cm" 
ComboBox1.ColumnWidths = "4cm;4 cm"
ComboBox1.AddItem "Row 1, Col 1"
ComboBox1.List(0, 1) = "Row 1, Col 2"
ComboBox1.AddItem "Row 2, Col 1 "
ComboBox1.List(1, 1) = "Row 2, Col 2"

But in VB.NET ComboBox1.List disappears. What's wrong here? Does anybody know why? pls help me
Thank again.


Jimmy Le
nhan_tiags@yahoo.com
 
Hello everybody. I found the problem. In .NET Combobox1.List becomes ComboBox1.set_List and ComboxBox1.Get_List
The code will be changed to look like this
Code:
Me.AxComboBox1.AddItem("Row 1 Col 1")
Me.AxComboBox1.set_List(0, 1, "Row 1 Col 2")
Me.AxComboBox1.AddItem("Row 2 Col 1")
Me.AxComboBox1.set_List(1, 1, "Row 2 Col 2")


Jimmy Le
nhan_tiags@yahoo.com
 
ah now I get it you are talking about the old vb6 activex thingie and not the new to be relaesed version. sorry about the mix up. but if you want to stop th conviusion stop using the name windows forms 2.0 because that will be the name of the new framework and the new windows forms.

Again im sorry about the mixup

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
What a wonderfull world - Louis armstrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top