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.
Some controls already have their own methods, so Edit control and others that may fit (Hotkey?) could have Edit.SetCue(String).
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) }
- 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.