At 01:23 PM 1/17/2008, Jan Johansen wrote:

Using a variable listview with images. This listview looks at
a temporary table to select paid invoices. My problem that I
am having is that when I issue a REFRESHLIST (which is required
due to the images) I am taken to the top of the list which is
undesireble.

Jan,

The REFRESHLIST command is doing exactly what it is intended
to do, i.e., to refresh the data set associated with Variable
Lookup ListView.


Trying to figure out a way to return to the last position
but am not getting the syntax right. Client unhappy.

Oh no. I'm really sorry that your client is unhappy. That's
not good. However, is it R:BASE's fault that your client is
not happy?

Does your client know that you have not implemented the
functionality and have forgotten the most important step?

Well, ask and you shall receive!

What you need to do is, first find the TOPITEM for the last
selected row (item) in the list (using GETPROPERTY command),
and then use the REFRESHLIST and TOPITEM (using PROPERTY
commands) to achieve your goal.

The typical implementation of a feature to retain the last
selected item as well as the top item on the list 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 want.

Client Very Happy!

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

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/


Reply via email to