Page 1 of 1

REFRESH PAINT?

Posted: Mon Jan 01, 2007 10:44 pm
by Ollie
I have a Dialog with DBF fields.
e.g. REDEFINE GET oGet6 VAR DB_CURR->COMPANY ID 60 OF Dlg_CURR

I have a "NEXT" button with ACTION DBSKIP(1)

How do I update/refresh/re-draw the screen to reflect the next record?

Posted: Tue Jan 02, 2007 12:32 am
by mag071
Hi,

REDEFINE GET oGet6 VAR DB_CURR->COMPANY ID 60 OF Dlg_CURR

I have a "NEXT" button with ACTION (DBSKIP(1),oGet6:Refresh())

Posted: Tue Jan 02, 2007 4:56 am
by Ollie
Thanks. Do you know where I can find a working sample that will demonstrate the principles involved in editing DBF records.

e.g. Set getobjects to readonly
When the user presses the "EDIT" button, set the getobjects to !readonly, lock the record, let the user edit and press "SAVE", commit, set getobjects to readonly again.

Where do I find METHODS, (CARGO?) values that are applicable to an object?

e.g. OGet1:READONLY:=.T.
Oget1:SETCOLOR('YELLOW','BLK') ..... sort of thing.

Posted: Tue Jan 02, 2007 5:41 am
by mag071
Do you know where I can find a working sample that will demonstrate the principles involved in editing DBF records.
\FWH\SAMPLES\CUSTOMER.PRG

Where do I find METHODS, (CARGO?) values that are applicable to an object?
\FWH\SOURCE\CLASSES\TGET.PRG

Posted: Tue Jan 02, 2007 6:09 am
by Ollie
Do you know where I can find a working sample that will demonstrate the principles involved in editing DBF records.
\FWH\SAMPLES\CUSTOMER.PRG


Thanks - but is doesn't run - Runtime error - ALIAS does not exist - line 20 - I can't see why - CUSTOMER.DBF is in the folder (not readonly or anything) Ideas?

Where do I find METHODS, (CARGO?) values that are applicable to an object?
\FWH\SOURCE\CLASSES\TGET.PRG


Thanks.

Posted: Tue Jan 02, 2007 6:36 am
by Ollie
Do you know where I can find a working sample that will demonstrate the principles involved in editing DBF records.
\FWH\SAMPLES\CUSTOMER.PRG


Ok, nevermind (how sad when you reply to your own post!) My mistake - Another sample had the file open!

However, that sample was not very helpful - I don't think it works the way its supposed to. The only button with an action is NEXT.

Can you offer a better example? I need something like the "CONTACTS" sample of MINIGUI to get me to understand the concept.

Appreciate all comments so far.

Posted: Tue Jan 02, 2007 2:35 pm
by Gale FORd
You can update the entire dialog by adding the UPDATE clause on the redefine and then doing oDlg:update() to refresh dialog.

Example:

Code: Select all

REDEFINE GET oGet6 VAR DB_CURR->COMPANY ID 60 OF Dlg_CURR UPDATE

I have a "NEXT" button with ACTION ( DBSKIP(1), Dlg_CURR:update() )

Posted: Tue Jan 02, 2007 3:30 pm
by Ollie
O, I get it - Thats cool. Thanks a lot.