Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting 1st Item in ListBox by code
Message
From
04/05/2012 16:48:22
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01543189
Message ID:
01543196
Views:
58
>>Hi Gang!
>>
>>I want to be able to programatically select the 1st item in a ListBox.
>>
>>e.g.
>>
>>In the ListBox are Dog,Cat,Bird,Hamster
>>
>>I want the program to go get the 1st item.. which is Dog.
>>
>>What would you code to this?
>>
>>Thanks
>
>Let me add to this.... what I wanted to say was that I wanted to get programatically the same result as if I clicked on the control and selected the 1st item.
>
>So I want to "click" on the item and then do an ListBox.InteractiveChange.

Set the list's ProgrammaticChange to call InteractiveChange (or better, add a custom AnyChange method and have PC and IAC both call it).

Then:

This.ListIndex = 1

sets the value and fires ProgrammaticChange.

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform