Subject Re: open form data entryfields scroll to focus
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Sat, 9 May 2020 21:24:19 -0700
Newsgroups dbase.getting-started

On 5/9/2020 2:01 PM, edward racht wrote:
> On 5/9/2020 4:20 PM, Ken Mayer wrote:
>> is this a case of the form is navigating to a rowset in a table (or
>> tables) and the data is "fluttering" on the screen as it gets to the
>> selected row
>
> when i open the form it is setting focus.  thes is movement in the
> entryfields or comboboxes as the selected rowset focused.
>
> Do I have a problem with the index or is something to be done before
> onopen?

Did you try my suggestion? I gave you some code examples to work with.
Telling the rowset to not notify controls should help.

You can go deeper and turn off updates the form through an API call ...
and we can add the code, rather than in the onOpen event handler to the
canOpen event handler (which fires before the form opens):


function form_canOpen()
    set procedure to :dUFLP:FormStuf.prg
    freeze( this.hwnd )
    // navigate to the row or this.rowset.first()
    unfreeze( this.hwnd )
    this.rowset.refreshControls() // update controls for current row
    close procedure :dUFLP:FormStuff.prg
return true // must return "true" or form won't open

Ken



--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm