Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make .Selected listbox item visible?
Message
 
To
10/07/1997 16:48:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00039346
Message ID:
00039448
Views:
32
>>If I have a listbox that shows 10 records at a time and I issue something like mylistbox.Selected(24)=.T., how do I make the listbox show a range of records that includes 24? Refresh and Requery don't seem to accomplish anything.
>
>I just made quick test and mylistbox.Selected(24)=.T. itself moves list items to proper range automatically. I tested for RowSourceType=0 and RowSourceType=6. What sourse do you use?

I am using RowSourceType=6. The listbox is on the second page of a 2 page pageframe. In Page2.Activate I have the code:

THIS.mylistbox.SetFocus

and in mylistbox.GotFocus I have the code:

THISFORM.LockScreen=.T.
mnrecno=RECNO()
COUNT ALL WHILE RECNO()#mnrecno TO mnoffset
THIS.Selected(mnoffset+1)=.T.
THISFORM.LockScreen=.F.

The right item is selected but the listbox does not move itself to the proper range. Is there something in my code that could be preventing this?
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform