Lenge
28th May 2010 14:34 UTC
How to enable/disable Back/Next/Cancel?
Hello world,
I wrote a custom MUI2 page using nsDialogs for some specific settings. On the bottom of the page, there are the three "standard" buttons (Back, Next, Cancel). Now I'd like to enable or disable some of these bottoms depending on the user's selections (e. g. from within the update function of a certain component).
Which command can I use to enable/disable the Back, Next and Cancel buttons?
Jens
Animaether
28th May 2010 14:49 UTC
just get a handle to the appropriate button...
Next Button: GetDlgItem $0 $HWNDPARENT 1
Cancel Button: GetDlgItem $0 $HWNDPARENT 2
Back Button: GetDlgItem $0 $HWNDPARENT 3
...then use EnableWindow...
disable: EnableWindow $0 0
enable: EnableWindow $0 1
MSG
28th May 2010 14:53 UTC
This question has been asked and answered maybe a hundred times before. Please search before you post.
Lenge
28th May 2010 15:03 UTC
Originally posted by MSG
This question has been asked and answered maybe a hundred times before. Please search before you post.
I did, obviously using improper search terms, or being somewhat blind. ;) However, if this is a FAQ, I'd expect to find the issue either in the nsDialogs manual or the corresponding FAQ. But (unless I am too blind again) it does not seems to appear anywhere on
http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html.
MSG
28th May 2010 15:13 UTC
The Next/Back/Cancel buttons don't have anything to do with nsDialogs. You can use google and the forum search, and then there's of course the command reference: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.14.6
Lenge
28th May 2010 15:34 UTC
Originally posted by MSG
The Next/Back/Cancel buttons don't have anything to do with nsDialogs.
Then that was my fundamental misperception (and maybe the reason I did not receive useful search results before). Thanks for pointing that out!
MSG
28th May 2010 19:23 UTC
Originally posted by Lenge
Then that was my fundamental misperception (and maybe the reason I did not receive useful search results before). Thanks for pointing that out!
Truth be told, I never really got around to understanding how the outer window DOES work, but the inside's what does it for me, I guess. ;)