AutoHotkey Community

It is currently May 27th, 2012, 12:36 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: September 11th, 2005, 1:21 pm 
Offline

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

for complex GUIs it's adviced to additionally use an apply-button. By default this button should be disabled and only enabled if there are changes made in the GUI. Also it would be nice, if all controls have their initial values, that the apply-button will be disabled again.

I'm actually doing it with a g-label for every Control (http://www.autohotkey.com/forum/viewtopic.php?t=5282), but often happens, that I forget to add the label to a control or an already applied g-label-subroutine.

What about an additional option to give GUI-controls a second predefined g-label which is executed after the custom g-label. Maybe it could have this Syntax:
Gui, 2:+DefaultLabel=SubRoutine

So for every control there has to be an additional option, to disable this default-label for one control, eg.:
Gui, 2:Add, Edit, w200 x10 y10 -DefaultLabel gOnlyThisSubRoutine

Also an additional A_Gui-Variable like A_GuiControlType would be helpful to let easyly exclude Buttons from that default-subroutine.

It could also be interesting to let the custom subroutine return -1 or NoDefaultLabel to prevent executing the default-subroutine for some cases.

Another thought is to add a special Control Gui, Add, ApplyButton which handles all automatically or to add a variable A_Gui2HasChanged.

I hope you understand what I'm talking about ;-)

_________________
Tekl


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

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
All of those approaches are good ideas. But for the following reasons, it might be a long time in coming:

1) Rarity of use (if anyone would definitely use a built-in Apply button or similar idea above, feel free to post here).

2) Code size and complexity, which is somewhat high unless it were done purely as a default g-label, with no built-in way to have exceptions. Even then it might be a little high.

On the other hand, this is clearly a high-value feature for scripts like yours that benefit from an Apply button. So it's definitely going on the to-do list for further consideration.

Thanks for the detailed suggestion.


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

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

if there is nobody else who needs this it may be better not to add it if it will increase AutoHotkeys size to much.

_________________
Tekl


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

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
Although I think the code size might be large for adding an apply button, an optional built in on-change event per control would probably work and keep AHK code and user code sizes down a bit. Just a thought...


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

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

isn't acutally the g-label that on change-event?

_________________
Tekl


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

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
Tekl wrote:
Hi,

isn't acutally the g-label that on change-event?

Hmm... so it seems to be. NM then.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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