Jump to content


Photo

child GUI's controls names not visible when using OnMessage


Best Answer Lexikos , 09 February 2013 - 03:54 AM

Fixed in v1.1.09.03.

 

Note that in this case, A_Gui refers to the child Gui (which contains A_GuiControl), while the Last Found Window is the top-level window which contains the control (i.e. parentgui).

Go to the full post


  • Please log in to reply
1 reply to this topic

#1 Deo

Deo
  • Members
  • 199 posts

Posted 23 March 2012 - 02:18 PM

here is an example
tooltip somehow show control names from parent gui
OnMessage( 0x200, "Tlp" )
Gui, parentgui:New,,parent
Gui, parentgui:Default
gui,add,edit, vparentcontrol1 w50,1
gui,add,edit, vparentcontrol2 w50,2
Gui, childgui:New, +ParentParentgui -Caption +Border
Gui, childgui:Default
gui,add,edit, vchildcontrol1 w50,3
gui,add,edit, vchildcontrol2 w50,4
gui,show,x70 y10 w100 h100
gui,parentgui:show,w200 h200
return

tlp(p_w, p_l, p_m, p_hw)
{
	tooltip % A_GuiControl "`n" A_Gui
}

i found a solution though, but it looks like bug:
tlp(p_w, p_l, p_m, p_hw)
{
hGui := DllCall( "GetParent", "Ptr", p_hw )
GuiControlGet, controlName,% hGui ":Name",% p_hw
tooltip % controlName
}


#2 Lexikos

Lexikos
  • Administrators
  • 8855 posts

Posted 09 February 2013 - 03:54 AM   Best Answer

Fixed in v1.1.09.03.

 

Note that in this case, A_Gui refers to the child Gui (which contains A_GuiControl), while the Last Found Window is the top-level window which contains the control (i.e. parentgui).