Re: Deactivate event for pagepanel
Jim Wagner <[email protected]> Fri, 29 Dec 2017 14:35:56 -0800
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Message-ID | <[email protected]> |
Trap it where you change the page panel, before any of the new text fields are populated. There is some sample code that demonstrates the use of a MessageDialog that halts the execution of code and does not proceed until the user clicks one of the dialog buttons. Check MessageDialog in the LR for example code. It works nicely. It will prevent the new fields from being populated before the previous one is saved or discarded. Jim James Wagner Oregon Research Electronics http://www.orelectronics.net <http://www.orelectronics.net/> > On Dec 29, 2017, at 2:21 PM, donJ <[email protected]> wrote: > > On 12/29/2017 04:00 PM, Jim Wagner wrote: >> 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 >> >> > > Hi James, > > Yes, that is basically what I'm looking for, but it fires at the wrong time. > > It's a simple window. A listbox with a long list of names and a page panel tht displays different info about each name. I put code in the pagepanel close event, but this is what happens: > I select a name from the listbox. I switch to the correct page panel and make a change. Now, if I select a different name from the listox, it changes to another person, losing the new info in the page panel, and then the message box about not applying the new data appears. > > I forgot to put in my first email: > Xojo 2016r4.1 > Linux mint 18 - 32 bit system > > Thanks for your time, > Don > > > > > To unsubscribe, email [email protected] > To unsubscribe, email [email protected]