Razzak,

Cool. Thanks for this. Looks like I will need to wait until the
next compiler is available to implement this option.

Did not mean to imply your product is bad.
Sometimes getting the correct PROPERTY commands
in the right order is my biggest challenge.
(Client was mainly unhappy for a variety of reasons.
I was just the dump on point)

Jan


-----Original Message-----

From: "A. Razzak Memon" <[EMAIL PROTECTED]>

To: [email protected] (RBASE-L Mailing List)

Date: Thu, 17 Jan 2008 16:25:59 -0500

Subject: [RBASE-L] - Re: Variable List View




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/ 
[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/ 
[http://www.rupdates.com/AuthorizedDevelopers/]

Reply via email to