I have a wizard. On the last page, the Cancel
button is active. Since the last page of a wizard
is typically a summary of what was *completed*,
it never made much sense to me to have it on the
final page. I want to at least disable it,
but I'm not sure how to get a reference to it
(from within the wizard page class). Even better
would be if I could suppress or remove it entirely.
When the page opens, I want it to do the following,
in order:
1. Disable the Finish and Cancel buttons.
(Cancel doesn't make sense at this point, and
the wizard isn't finished until it finishes processing.)
2. Do processing, with progress feedback. [DONE]
3. Add further-action control (i.e., whether to open another,
related window) and messages after processing is complete. [DONE]
4. Enable the finish button so user can exit Wizard.
1 and 4 are where I'm hitting a wall.
Can someone give me a hint?
- Sam
···
__________________________________________________________
Spinward Stars, LLC Samuel Reynolds
Software Consulting and Development 303-805-1446 http://SpinwardStars.com/sam@SpinwardStars.com
I have a wizard. On the last page, the Cancel
button is active. Since the last page of a wizard
is typically a summary of what was *completed*,
it never made much sense to me to have it on the
final page. I want to at least disable it,
but I'm not sure how to get a reference to it
(from within the wizard page class). Even better
would be if I could suppress or remove it entirely.
When the page opens, I want it to do the following,
in order:
1. Disable the Finish and Cancel buttons.
(Cancel doesn't make sense at this point, and
the wizard isn't finished until it finishes processing.)
2. Do processing, with progress feedback. [DONE]
3. Add further-action control (i.e., whether to open another,
related window) and messages after processing is complete. [DONE]
4. Enable the finish button so user can exit Wizard.
1 and 4 are where I'm hitting a wall.
Can someone give me a hint?
Lookup the buttons by ID. For example:
cancelBtn = wizard.FindById(wx.ID_CANCEL)
I think the Finish button is the same as the Next button, it has just had it's label changed. So you can get it with the wx.ID_FORWARD.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Thanks! That's just what I needed.
I also (at about the same time your message arrived)
found it via Google on the wxWidgets wiki.
I'll have to search more thoroughly in the future
before I cry for help.
- Sam
···
At 2004-10-29 03:55 PM -0700, you wrote:
Lookup the buttons by ID. For example:
cancelBtn = wizard.FindById(wx.ID_CANCEL)
I think the Finish button is the same as the Next button, it has just had it's label changed. So you can get it with the wx.ID_FORWARD.
__________________________________________________________
Spinward Stars, LLC Samuel Reynolds
Software Consulting and Development 303-805-1446 http://SpinwardStars.com/ sam@SpinwardStars.com