Gui Controls | Gui.FocusedCtrl | ControlGetFocus | ComboBoxEx
Posted: 15 Jul 2018, 13:17
Gui.FocusedCtrl: Currently retrieves the GuiControl object of the GUI's focused control. But in a ComboBoxEx control the control that takes the focus is the Edit control. I propose to add FocusedCtrlHwnd or that FocusedCtrl return HWND if the control that has the focus was not created by the Add method of the GUI object.
ControlGetFocus: I propose that this function returns the control's identifier instead of the ClassNN. Because the identifier is more useful. Or we can add ControlGetFocusHwnd.
Gui Controls: I would like to know if you intend to improve the methods of the Gui Controls. Currently the methods are of "general scope", very poor. Because of this I have to use a class wrapper. Yes, I know, I can make my own functions, but I would be losing the "comfort" of using the Gui Control Object. As an example, see my class Tab, there is an important method to calculate the display area to know where to put controls, as well as the possibility of adding icons. I know that if you omit the X and Y coordinates, the control automatically adjusts, but, what if we want a different margin? What about the height and width?. This I can apply to almost all controls, its implementation is very poor.
I would also like to remove the ComboBox control and replace it with ComboBoxEx. Also see my class, I think it is the most appropriate behavior (see the Focused property).
I also want to ask about behavior that I do not understand in my class. If you change the Text parameter to ByRef in the FindString method, then when you use it with #Warn it gives you a warning, I do not know why.
Code: Select all
Gui := GuiCreate()
Gui.AddCustom("ClassComboBoxEx32 +0x40 +0x2")
Gui.AddComboBox()
Gui.Show()
Gui.OnEvent("Close", "ExitApp")
Return
F1::
ToolTip Type(Gui.FocusedCtrl)
Return
ControlGetFocus: I propose that this function returns the control's identifier instead of the ClassNN. Because the identifier is more useful. Or we can add ControlGetFocusHwnd.
Gui Controls: I would like to know if you intend to improve the methods of the Gui Controls. Currently the methods are of "general scope", very poor. Because of this I have to use a class wrapper. Yes, I know, I can make my own functions, but I would be losing the "comfort" of using the Gui Control Object. As an example, see my class Tab, there is an important method to calculate the display area to know where to put controls, as well as the possibility of adding icons. I know that if you omit the X and Y coordinates, the control automatically adjusts, but, what if we want a different margin? What about the height and width?. This I can apply to almost all controls, its implementation is very poor.
I would also like to remove the ComboBox control and replace it with ComboBoxEx. Also see my class, I think it is the most appropriate behavior (see the Focused property).
I also want to ask about behavior that I do not understand in my class. If you change the Text parameter to ByRef in the FindString method, then when you use it with #Warn it gives you a warning, I do not know why.