Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: prasanna kunder
  Where is prasanna kunder?
 mumbai
 India
 prasanna kunder
 To: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 Tags
Subject: RE: how prevent accident key press
Thread ID: 331357 Message ID: 331362 # Views: 42 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Thursday, December 29, 2011 9:04:46 AM         
   


> >
> > if user don't want to save that entry,
> > then what
> > thanks
>
>
> That is why you have cancel button right?
>
> I have not looked properly at your image but considering you have these buttons, on first run of the form, Enabled property should be:
>
> Add - .T.
> Edit - .T.
> Delete - .T.
> Save - .F.
> Cancel - .F.
>
> * NAV
> Top - .T.
> Next - .T.
> Preview - .T.
> Bottom - .T.
>
> Create a method called Toggle:
>
>
with thisform as form 
>   .cmdAdd.Enabled = !.cmdAdd.Enabled
>   .cmdEdit.Enabled = !.cmdEdit.Enabled
>   .cmdDel.Enabled = !.cmdDel.Enabled
>   .cmdSave.Enabled = !.cmdSave.Enabled
>   .cmdCancel.Enabled = !.cmdCancel.Enabled
>   .cmdTop.Enabled = !.cmdTop.Enabled
>   .cmdNext.Enabled = !.cmdNext.Enabled
>   .cmdPrevious.Enabled = !.cmdPrevious.Enabled
>   .cmdBottom.Enabled = !.cmdBottom.Enabled
> endwith 
> 

>
> On Add, Edit, Save, and Cancel buttons, call that method:
>
>
Thisform.Toggle()
> 

>
> http://sandstorm36.blogspot.com
> http://weblogs.foxite.com/sandstorm36/default.aspx


using this method
we must press first save or cancel button
then we can go any button
in this case if user press new, he doesn't make any changes
then also he must press cancel button

sir what i am asking
if we make properties

thisform.change = .f.

after every object in form check interactive change
thisform.change = .t.

any idea
thanks

ENTIRE THREAD

how prevent accident key press Posted by prasanna kunder @ 12/29/2011 8:32:41 AM
RE: how prevent accident key press Posted by Jun Tangunan @ 12/29/2011 8:37:43 AM
RE: how prevent accident key press Posted by prasanna kunder @ 12/29/2011 8:39:59 AM
RE: how prevent accident key press Posted by Jun Tangunan @ 12/29/2011 8:49:37 AM
RE: how prevent accident key press Posted by prasanna kunder @ 12/29/2011 9:04:46 AM
RE: how prevent accident key press Posted by Stefan Wuebbe @ 12/29/2011 9:16:46 AM
RE: how prevent accident key press Posted by prasanna kunder @ 12/29/2011 10:05:06 AM
RE: how prevent accident key press Posted by Zul Rahim @ 12/29/2011 11:06:00 AM
RE: how prevent accident key press Posted by Muhammad Majid Ali Attari @ 12/30/2011 6:29:04 AM
RE: how prevent accident key press Posted by prasanna kunder @ 12/30/2011 8:48:51 AM
RE: how prevent accident key press Posted by Jun Tangunan @ 12/30/2011 7:17:14 AM
RE: how prevent accident key press Posted by prasanna kunder @ 12/30/2011 8:48:14 AM