- NSIS Discussion
- Groups and Controlling them in MUI
Archive: Groups and Controlling them in MUI
torpark
4th December 2006 00:30 UTC
Groups and Controlling them in MUI
I have a single page of controls. I need to know how to group the controls, and then control the group.
I want to be able to have the controls in the second groupbox all grayed-out. When you enable the correct setting in the first groupbox, it enables all the controls int he second groupbox.
1) How do i group controls into a groupbox?
2) how do i control the flag of a group?
3) can this even be done?
Images attached below.
torpark
4th December 2006 00:39 UTC
file 1
torpark
4th December 2006 00:41 UTC
file 2
torpark
4th December 2006 00:42 UTC
Here is the installer mui.
bholliger
4th December 2006 03:46 UTC
Hi torpark!
Here you are. I've created the initial structure for you. Now it should be easy to add the rest of the elements.
I'll create a wiki page based on this code.
Have fun!
Cheers
Bruno
torpark
4th December 2006 07:03 UTC
Wow. This is really coming along. Now i need to figure out how to get that notify to enable the buttons as well as the rest of the controls.
bholliger
4th December 2006 09:51 UTC
To enable NOTIFY of a control, you have to introduce
[Field XY]
...
Flags=NOTIFY
Whenever the state is changing, the leave function is called. Then you can react using the switch structure made in your script.
Cheers
Bruno
torpark
4th December 2006 15:06 UTC
Awesome, I added the buttons in. I notice if go "Next" and then "back" there is an issue. The proxyreq = 1, but the group is all de-activated. Is there a specific macroset for "back" ?
torpark
4th December 2006 18:29 UTC
Okay, here is some update. One problem I am having is I can't make the code for the button work. It is supposed to call the getproxydata function and write the findings into the UI. Instead it says the installer is corrupted. ???
bholliger
4th December 2006 21:18 UTC
Hi torpark!
Ok, I've changed some small things. We have to write the state of the element back to the Flags, so you can use the back button.
The new macro CHANGETEXTFIELD sets the value in the ini and sets the value of the text field. Have a look at the code. You can extend it yourself.
I haven't got enough time to fix the GetProxySettings function. But there must be a problem. I suggest rewriting the function with LogicLib.
Hope this helps!
Have a nice day!
Cheers
Bruno
torpark
5th December 2006 05:26 UTC
Great job! I fixed the proxy auto detector. So now that we have all the data we want, and I want to write it to a INI, I need to know... how do I control the remaining buttons? I notice I am left only with a "Close" and "Cancel" button. Ideally, like to flip position of the Close and Cancel buttons, and replace the Cancel button with "Write INI"
Any ideas? Thanks again.
bholliger
5th December 2006 05:33 UTC
Hi torpark!
Well I'd leave it as it is, but I'd change the captions of the buttons. That's easy and can be done with the following entries in the ini file:
[Settings]
NumFields=23
Title=Torpark Configuration Wizard
CancelShow=1
CancelButtonText=&Cancel
NextButtonText=&Save
[Field 1]
Type=Group
:
:
Cheers
Bruno