Data Access Worldwide Knowledge Base

Article ID 2209
Article Title HOWTO: Have highlighted record displayed in the middle of a dbList
Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2209
KBase Category VDF11
Date Created 01/23/2006
Last Edit Date 11/03/2006


Article Text
QUESTION:
I created a dbList with a list of orders. Every time I close the dbList, the highlighted record is displayed at the top of the list when I reopen the view containing the dbList. What can I do to display it in the middle -- like the selection lists do?

ANSWER:
You can override the initialize_list method so it will only execute the first time the list is displayed. For example:

Create an integer property like:
property integer piLoadTime 1

In the dbList, override the initilize_list method with:

Procedure Initialize_List
    Integer iLoad

    Get piLoadTime to iLoad
    If (iLoad = 1) Begin
        Increment iLoad
        Set piLoadTime to iLoad

        Forward Send initialize_list
    End
End_Procedure

This should make your dbList behave as you described.


KEYWORD:
lookup list, selection list


Contributed By:
Marcia Booth
Company: Data Access Worldwide
Web Site: http://www.dataaccess.com


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.