Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox 's unselectable items, how to count?
Message
From
26/09/2007 14:15:22
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
ListBox 's unselectable items, how to count?
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01256996
Message ID:
01256996
Views:
129
Hi,

I have a multi-columns ListBox, RowSourceType = 0 and ColumnLine = .T. and it can display 5 items with its height. In order to always have the column lines go from the top to the bottom, I have, in my code the below:

DO WHILE MyListBox.ListCount < 5
MyListBox.AddItem("\]" + CHR(160))
ENDDO

Just to make sure there will be at least 5 items on the list, fewer than that, the list is padded at the end with unselectable items. Am I doing it the right way... or should I ask, is there a better way to get what I want?

Btw,

After a list is fully up, is there any way I can check its item to determine whether it is selectable or not? I mean is there a generic way to count the unselected items on a listbox?
Next
Reply
Map
View

Click here to load this message in the networking platform