Sep 6, 2000 #1 august MIS Aug 24, 2000 150 PH How can i enable buttons to .f. when i'm in adding record mode? what is the proper way of doing it? august [sig][/sig]
How can i enable buttons to .f. when i'm in adding record mode? what is the proper way of doing it? august [sig][/sig]
Sep 6, 2000 #2 jonscott8 Programmer May 12, 2000 1,317 US Use the refresh event of the button. For Example, if your modes are: View=0,Add=1,Edit=2 PROCEDURE CmdAdd.Refresh() THIS.ENABLED = (THISFORM.Mode=0) ENDPROC PROCEDURE CmdAdd.Click() THISFORM.Mode=1 THISFORM.Refresh() ENDPROC PROCEDURE CmdEdit.Refresh() THIS.ENABLED = (THISFORM.Mode=0) ENDPROC PROCEDURE CmdEdit.Click() THISFORM.Mode=2 THISFORM.Refresh() ENDPROC PROCEDURE MyForm.Refresh() THIS.cmdAdd.Refresh() THIS.cmdEdit.Refresh() ENDPROC [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>Carpe Diem! - Seize the Day![/sig] Upvote 0 Downvote
Use the refresh event of the button. For Example, if your modes are: View=0,Add=1,Edit=2 PROCEDURE CmdAdd.Refresh() THIS.ENABLED = (THISFORM.Mode=0) ENDPROC PROCEDURE CmdAdd.Click() THISFORM.Mode=1 THISFORM.Refresh() ENDPROC PROCEDURE CmdEdit.Refresh() THIS.ENABLED = (THISFORM.Mode=0) ENDPROC PROCEDURE CmdEdit.Click() THISFORM.Mode=2 THISFORM.Refresh() ENDPROC PROCEDURE MyForm.Refresh() THIS.cmdAdd.Refresh() THIS.cmdEdit.Refresh() ENDPROC [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>Carpe Diem! - Seize the Day![/sig]
Sep 11, 2000 #3 tjfox Programmer Sep 11, 2000 4 US * when add mode with thisform store .f. to .btnadd.enabled, .btnedit.enabled,; .btndelete.enabled, .btnnext.enabled,; .btn .... etc. end with * to update or cancel with thisform store .t. to .btnadd.enabled, .btnedit.enabled,; .btndelete.enabled, .btnnext.enabled,; .btn .... etc. end with [sig][/sig] Upvote 0 Downvote
* when add mode with thisform store .f. to .btnadd.enabled, .btnedit.enabled,; .btndelete.enabled, .btnnext.enabled,; .btn .... etc. end with * to update or cancel with thisform store .t. to .btnadd.enabled, .btnedit.enabled,; .btndelete.enabled, .btnnext.enabled,; .btn .... etc. end with [sig][/sig]