AutoHotkey Community

It is currently May 27th, 2012, 1:15 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: September 11th, 2005, 2:37 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi,

I think there are often cases where some options in a GUI are dependent on one option/checkbox, so that is senseless to let a user alter options that won't have an effect if this option/checkbox is not set true. With a g-label and Gui,Control it's easy to implement this, but for bigger GUIs it's a lot of work. Maybe it could be done more easily when add an option to Controls to bind them to one option. This binding will automatically disable all dependent options if the checkbox is not checked and will enable them if the checkbox is checked.

Maybe this syntax could be used:

Code:
Gui, Add, CheckBox, vBindingCheckbox Checked%BindingCheckbox%, Enable/Disable the following options
Gui, Add, Edit, vName dBindingCheckbox, %Name%
Gui, Add, Checkbox, vAdult dBindingCheckbox Checked%Adult%


btw. is there a way to avoid those "vVariable Checked%Variable%" and "vVariable, %Variable%"-constructs? Isn't that the way a GUI should always be used?

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
PostPosted: September 11th, 2005, 4:25 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Tekl wrote:
I think there are often cases where some options in a GUI are dependent on one option/checkbox
...
This binding will automatically disable all dependent options if the checkbox is not checked and will enable them if the checkbox is checked.
I think this falls into the category of scoring low due rarity of use + large code size. If anyone else would definitely use this feature, please post here. In any case, I'll put it on the list for future consideration.

Thanks for the suggested syntax.

Quote:
btw. is there a way to avoid those "vVariable Checked%Variable%" and "vVariable, %Variable%"-constructs? Isn't that the way a GUI should always be used?
It's a great idea but implementing it would break existing scripts. However, corrupt suggested having a "reverse submit" command that would update each control with the current contents of its variable. Hopefully it will suffice for the purposes you have in mind.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 11th, 2005, 5:30 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi Chris,

Corrupt's idea is really brilliant and more flexible, because so you can undo settings while gui is active. In my case it would be a bit confusing. My big GUI takes some time building, so I decided to improve the 'feeled' performance by early showing the GUI, but let the user see how it is built. So if use a reverse submit the user will the first default-values which will change after the gui hast finished building. Hmm... maybe if a reverse submit is called before creating the first control it could create them directly with the variable-content. Or add a special option:

Gui, 2:+DefaultToVariableContent (maybe a better understandable word)

Thanks for your fast replies

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 12th, 2005, 1:45 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Great idea. I'll try to do it as long as it's not overly large in code size.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group