[v2] Additions to GUI

Propose new features and changes
SirRFI
Posts: 404
Joined: 25 Nov 2015, 16:52

[v2] Additions to GUI

28 Sep 2017, 16:15

As I mentioned in another thread - I like 2.0a GUI way more over 1.1, in fact that's what made me try it before beta/release. I like creating things "dynamically" (if that's proper term - generating elements in loop based on arrays/objects and alike), so it saves me a lot of troubles 1.1 creates due to the old syntax.

Given the development opportunity, I want to suggest some more additions to the GUI, assuming they aren't added:
  • Placeholder string in text field controls - grayed out text that is being displayed when the text field is empty. I know it can be easily added using following code, but why not have it inbuilt? Also, the code is for single-line/row EDIT controls, but there must be a way to make it multiline.

    Code: Select all

    SetCue(HWND, Text)
    {
    	STATIC EM_SETCUEBANNER := (0x1500 + 1)
    	Return DllCall("User32.dll\SendMessageW", "Ptr", HWND, "Uint", EM_SETCUEBANNER, "Ptr", True, "WStr", Text)
    }
    
    Some controls already have their own methods, so Edit control and others that may fit (Hotkey?) could have Edit.SetCue(String).
  • Add GuiCtrl.OnEvent("hover", time, function) or similar (maybe time included after word hover to keep 2 arguments amongst all types, if possible ofc), which would allow to perform action once the mouse cursor is over a control for given amount of time. For an example, keeping cursor over a CheckBox for 2 seconds would display a ToolTip explaining what it is for.
  • BackgroundColor affecting the actual control in all cases. For example, using it at GroupBox will affect only background of the GroupBox's text, if any exists; for Button it will show up only behind the button, where with +Theme (default) are the rounded corners. While in some cases it might be unwanted - I propose adding ControlColor or alike. Combining these two would allow CheckBox text's background and the square to be colored differently.
That's all I came up with so far, but pretty sure there are some more simple, yet useful things that could be added.
Use

Code: Select all

[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 18 guests