rafiqque
14 years agoOccasional Contributor
TcxListBox Control how to add multiple columns
Hi,
Using TcxListBox control in UserForms how can I add multiple columns. I can define the number of columns. But adding I am not sure how to add them in to seperate columns.
the example provided adds single column
with
(UserForms["UserForm1"]["cxComboBox1"]["Properties"]["Items"])
{
Add("Item1");
Add("Item2");
Add("Item3");
Add("Item4");
Add("Item5");
}
Any sample script will be much appreciated
Rafiq Mohammed
Using TcxListBox control in UserForms how can I add multiple columns. I can define the number of columns. But adding I am not sure how to add them in to seperate columns.
the example provided adds single column
with
(UserForms["UserForm1"]["cxComboBox1"]["Properties"]["Items"])
{
Add("Item1");
Add("Item2");
Add("Item3");
Add("Item4");
Add("Item5");
}
Any sample script will be much appreciated
Rafiq Mohammed
Hi,
The fact is that items are added to the TcxListBox component sequentially and are stored in the TString object. The items are not allocated to different columns. They can just be displayed in different columns, but you cannot access them, for example, by row indexes and column indexes.
The number of displayed items in the column depends on the height of the component (you can modify it manually or using the Height property). So, once the first column is full, TestComplete starts filling in the second column, and so on.
So, to add the needed item to the needed column by using TcxListBox, you need to configure a certain height of the component, and then form a list of items in a certain order.