Kimball Larsen
2005-04-28 06:24:13 UTC
This may have been discussed before, but more attention can't hurt,
right?
I have a preferences screen that I have built from scratch. This
screen is composed of a tab panel with several tabs for various
categories of preferences that the user needs to set. I want to force
the user to save preferences before they switch from one tab to
another, and I have provided a "Save" button for this purpose. I do
not want to automatically save the preferences as they modify them for
other reasons not worth getting into here.
When any value in the preferences window is modified, a flag is set to
true that indicates the prefs need to be saved.
In the change() event of the tabPanel, I have added some code that
warns the user they need to save the prefs before continuing on to the
next tab. However, the change() event seems to fire AFTER the change
actually takes place. Thus, behind my alert, the tab they have changed
TO is visible, not the one they have changed FROM. So, when I warn
them that they have made changes in tab A, they are looking (in the
background) at tab B already, as the panel has already moved along to
the next tab.
Short of some really nasty and rather convoluted variables that are
used to switch back to the previous tab (which means tracking the
previous tab) momentarily so it appears to the user that they are still
on the first tab, what can I do to detect the tab has switched?
I've also considered detecting mouse up events that happen over the
tabs themselves, in the hopes that mouseUp is handled before the
change() is fired.
Any ideas would be great.
-- Kimball
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
right?
I have a preferences screen that I have built from scratch. This
screen is composed of a tab panel with several tabs for various
categories of preferences that the user needs to set. I want to force
the user to save preferences before they switch from one tab to
another, and I have provided a "Save" button for this purpose. I do
not want to automatically save the preferences as they modify them for
other reasons not worth getting into here.
When any value in the preferences window is modified, a flag is set to
true that indicates the prefs need to be saved.
In the change() event of the tabPanel, I have added some code that
warns the user they need to save the prefs before continuing on to the
next tab. However, the change() event seems to fire AFTER the change
actually takes place. Thus, behind my alert, the tab they have changed
TO is visible, not the one they have changed FROM. So, when I warn
them that they have made changes in tab A, they are looking (in the
background) at tab B already, as the panel has already moved along to
the next tab.
Short of some really nasty and rather convoluted variables that are
used to switch back to the previous tab (which means tracking the
previous tab) momentarily so it appears to the user that they are still
on the first tab, what can I do to detect the tab has switched?
I've also considered detecting mouse up events that happen over the
tabs themselves, in the hopes that mouseUp is handled before the
change() is fired.
Any ideas would be great.
-- Kimball
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>