hi Andrew,
Am Wednesday 30 August 2006 14:27 schrieb Andrew Jensen:
<>
> The real question then becomes how do you make the UI behave
> nicely. If you where using forms instead of dialogs this all gets
> done for you.
>
> But you say you have a dialog box so, you might put the bookmark
> feature to work for you here. When the user asks to delete a
> record you could : freeze screen updates,
> save the ID,
> move back one record,
> create a bookmark,
> issue the delete statement with the saved ID as criteria,
> reload the rowset,
> moveto the saved bookmark,
> populate the dialog box with current record's data
> or
> populate list box(s)
> set selected based on bookmark
> un-freeze screen updates
>
> Using dialog boxes I am not sure about the freeze screen updates
> [LockControllers] ( have never tried this with a dialog ), and I
> am not sure how you are displaying the data to the user; one
> record at time, or as a stringlist . Either way however the basic
> steps would still hold firm, I think.
>
Thanks, I will try playing with bookmarks...
How can you do a nice GUI with a form (a writer doc)? :=)
To show a nice GUI using a dialog is easy:
Insert:
oRoSe.execute()
selDlgMode("resetAddRec") 'gray out the SAVE botton, ...
showThisKey=iAid 'say which record you want to
' see ->the new one<-
' got from CALL
' IDENTITY()'
showTheRow() 'show the rowSet in the
' peepholes of the
' dialog
The records are sorted, therefore one must find the key, not the
position.
Delete:
curRow=oRoSe.getRow()
<now delete>
oRoSe.execute()
oRose.absolute(curRow) 'jump to the old position -> the
' next candidate is
' on screen
selDlgMode("resetDelRec")
showTheRow
Greetings
Wolfgang
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]