Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Highlight Listbox row - is it possible?
Message
From
06/12/2004 12:29:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00967126
Message ID:
00967255
Views:
8
>Hello Cetin
>
>>When rowsource is sonething that's based on a cursor (alias,fields,query,sql) then you've >a listindex=recno("underlyingsource") relationship.
>
>>Added a new record or requeried and set pointer in source to desired record:
>
>>thisform.myList.ListIndex = recno("underlyingsource")
>
>If you add a new record or delete one, are you saying that you should re-sync the listindex or, does the listbox do this automatically?
>
>Also, the cursor in question is a table buffered remote view so, the recno() of newly added records start at -1. Might this be what is causing the problem?
>
>Please let me know if you can :)
>
>Regards
>
>Angie

Angie,
Still you could use it with some calculation. ie:

.CustomProperty = reccount() && After a requery

.ListIndex = iif(recno() < 0, abs(recno())+.CustomProperty, recno())

However using Value property in that case might be easier:
myListbox.Value = myView.PK

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform