>>> A. Razzak Memon<[EMAIL PROTECTED]> 1/18/2008 4:47 PM >>>
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/


Hello Razzak,
Maybe I am misunderstanding what this property does.  Please bear with me...  When I try the RRBYW14 example, I go down to customer# 123 and press refresh list.  The list goes back to the top.  When I trace it, the variable  vtopitem remains null after the getproperty command runs.  I expected the variable to take on the value from the top line of the list, instead of staying null.  The refreshlist takes the list up to the top again; the property topitem does not seem to do anything with the null variable (both as one would expect). 
 
 
I am getting the same results in both the rrbyw14 example and in my eep which I derived from steps A-C above:
GETPROPERTY DrivingTableListView TOPITEM 'vdrivingitem'
GETPROPERTY SelectedValuesListView TOPITEM 'vSelecteditem'
PROPERTY DrivingTableListView REFRESHLIST 'TRUE'
PROPERTY SelectedValuesListView REFRESHLIST 'TRUE'
PROPERTY DrivingTableListView TOPITEM .vdrivingitem
PROPERTY SelectedValuesListView TOPITEM .Selecteditem
RETURN
 
To further test my eep's use of Propterty TOPITEM, I set the TOPITEM variable (vdrivingitem) to a value in the middle of the list (assuming that topitem uses a text value numeral to denote the order).  The item with that number was greyed, but not blue (selected), and the list was back up to the top, rendering the greyed item not visible, without using the slider to bring it further up in the list.
 
I am sure open for ideas on this...Thanks again for your help!
Ted
 
 

Reply via email to