At 07:31 PM 1/18/2008, Ted Lienhard wrote:
Hi Razzak,
I too am trying to have a VariableLookupListView refresh but not
change the position of the list items.
Is the proper operation of TOPITEM for Getproperty TOPITEM to
find the top visible row of the VariableLookupListView and then
Property TOPITEM to return the VariableLookupListView top visible
item to the top position? I am not succeeding in the attempt to
make this happen...
I was using the latest build and then tried PR3 with no success.
Using my form and then trying RRBYW14 does not change my results.
When I trace the file in the PropertyTopItem form in RRBYW14, I
noticed that the Getproperty TOPITEM only returns a NULL value.
What am I doing wrong?
Ted,
The typical implementation of a feature to retain the last
selected item as well as the top item in the ListView when
refreshed, would be as following:
A. Find the top item on the list before refreshing the list
GETPROPERTY <VarListViewCompID> TOPITEM vTopItem
B. Now refresh the list
PROPERTY <VarListViewCompID> REFRESHLIST 'TRUE'
C. Keep top item exactly the same before refreshing the list
PROPERTY <VarListViewCompID> TOPITEM .vTopItem
This technique should give you the results you need.
Here's a sample application to demonstrate the use of such
feature in R:BASE 7.6, C/S:I 7.6 and Turbo V-8 for Windows.
http://www.razzak.com/sampleapplications/
Sample Applications: Using TOPITEM Property in ListViews
Note: Use this sample in conjunction with RRBYW14 database.
Enjoy and make sure to have fun!
Very Best R:egards,
Razzak.
PS.
Make sure that you are using the latest updates of RBG76
or RBG8. http://www.rupdates.com/AuthorizedDevelopers/