Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox Focus
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01350476
Message ID:
01350583
Views:
29
>>>>>I can set a record to be highlighted no problem, it's just that I want it to be center of the listbox.
>>>>
>>>>Is this record supposed to be at the bottom of the visible portion by its number and you just want to scroll the listbox to place it in the middle ?
>>>
>>>When the listbox appears, I just want the highlight to be in the middle of the listbox, regardless of which record it is.
>>
>>It is still not clear - do you want specific record higlighted and this record be in the middle or you want to highlight the record in the center?
>
>I want to highlight the record in the center. Sorry if I was ambiguous.

Ok, it should be simple, then. The only problem is what is the property that determines how many records you have in the visible part of the listbox? I don't remember. If we have this property, then just divide it by 2 and set this record selected to be true. Use round() and also min of this property and your total number of records.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform