Ideal Gui implementation

Propose new features and changes
func
Posts: 47
Joined: 20 May 2016, 20:52

Ideal Gui implementation

23 Feb 2017, 12:31

I have no idea how to implement this, but I'm just dreaming/wishing from the starting point of how it would be done in an ideal way to me,
instead of the way the current gui commands/functions work, even in ahk v2, I'd like to see 'ahk v3' or a patch to make it work like this:

Code: Select all

gui(Window) {
	label(My Window)
	gui(Button) {
		label(My Button)
		parent(My Window) ; not required because it's nested under My Window, but this can be used to override its parent
		callback(My-Button-Event)
		style(Default)
		font(Segoe UI)
		enabled(True)
		vert-margin(10)
		horiz-margin(10)
		min-width(60)
		min-height(20)
		stretchable-width(100)
		stretchable-height(40)
				}
			}
Defaults for each sub-function would allow users to omit most of them unless they need custom parameters, such as label(My Unique Name)

By doing things this way, it would be simple to add a condition for the "enabled" option for a button, for example:

Code: Select all

gui(Window) {
	label(My Window)
	gui(Button) {
		label(My Button)
		parent(My Window) ; not required because it's nested under My Window, but this can be used to override its parent
		callback(My-Button-Event)
		style(Default)
		font(Segoe UI)
		if (myVar = 1)
			enabled(True)
		else
			enabled(False)
		vert-margin(10)
		horiz-margin(10)
		min-width(60)
		min-height(20)
		stretchable-width(100)
		stretchable-height(40)
				}
		}
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Ideal Gui implementation

23 Feb 2017, 12:49

I'd like to see something similar to Java Swing.
Recommends AHK Studio

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 52 guests