Is that possible? The documentation says, the g-label for the edit control is only executed when the content of the control is changed.
I woould like to call a function when a doubleclick into the edit control occurs, and in that function I need to know where the doubleclick was (ideally line number/ char in line, but character number in whole text would also be sufficient (the screen position is not enough, as the text may have been scrolled
I suppose I will need another control (instead of the standard edit control) if I want do highlight some parts of the text with another background color? What controls are currently available for such a purpose?
Edit control to react on double click?
Re: Edit control to react on double click?
Code: Select all
t = 234567890`n
Gui, Font, s10
Gui, Add, Edit, w200 r20 vttext, 1%t%2%t%3%t%4%t%5%t%6%t%7%t%8%t%9%t%
Gui, Show,, Test
OnMessage(0x0203, "WM_LBUTTONDBLCLK")
WM_LBUTTONDBLCLK(wParam, lParam) {
If (A_GuiControl != "ttext")
Return
ControlGet, lineNum, CurrentLine,, Edit1
ControlGet, colNum , CurrentCol ,, Edit1
ToolTip, Line = %lineNum%`nCol = %colNum%
SetTimer, Off, -2000
Return
Off:
ToolTip
Return
}
Re: Edit control to react on double click?
Thank you!