Re: Deactivate event for pagepanel

Jim Wagner <[email protected]> Fri, 29 Dec 2017 14:00:22 -0800
Newsgroups gmane.comp.lang.realbasic.user
Message-ID <[email protected]>
I would have a boolean “Dirty”. It is set any time the user makes any change to any of the fields.

Then, in the close event or panel change event, check Dirty. If it is true, post a warning about saving the changes.

Simple. That is the way many applications do it.

Jim

James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>




> On Dec 29, 2017, at 1:03 PM, donJ <[email protected]> wrote:
> 
> Hi,
> Merry Christmas to all!
> 
> I have a pagepanel which includes a bunch of TextFields to allow the user to edit information. Then, there are buttons: Cancel, Revert and Apply.
> 
> It works fine except, if the user forgets to apply the changes, there is no warning. If he then selects a different record to edit, the info on the pagepanel is changed, losing the first changes.
> 
> A pagepanel  has an "AutoDeactivate" property, but no Activate or Deactivate event to trigger a warning message.
> 
> I suppose I could set "enabled = false" for the other controls on the window when the panel is accessed or the frist change is made, to avoid changing the record, but there still would be no message.
> 
> Any ideas?
> 
> Thanks,
> Don
> 
> 
> To unsubscribe, email [email protected]
> 




To unsubscribe, email [email protected]