Hi,
Is it possible to attach a textbox to a menu with AHK?
textbox inside a menu
Re: textbox inside a menu
Hi,
why do you want to do it?
why do you want to do it?
Re: textbox inside a menu
Like this?
Code: Select all
Gui, -Caption +ToolWindow
Gui, Font, s12, Arial
Gui, Margin, 0, 0
Gui, Add, Edit, w200 gInputChanged vkw,
Gui, Add, ListView, y+-1 w200 h200 +HWNDhLV -Hdr AltSubmit gLvEvent, Items
Loop, 10 {
LV_Add("", "Item-" A_Index)
}
LV_ModifyCol(1, 179)
lvCtrl_SetRowHeight(30)
lvCtrl_SetWindowTheme(hLV)
ControlGet, lvData, List,,, ahk_id %hLV%
Gui, Show
Return
InputChanged:
GuiControlGet, kw
GuiControl, -Redraw, %hLV%
LV_Delete()
Loop, Parse, lvData, `n, `r
{
if (kw = "") || InStr(A_LoopField, kw)
LV_Add("", A_LoopField)
}
GuiControl, +Redraw, %hLV%
Return
LvEvent:
if (A_GuiEvent = "Normal") && (RowNumber := A_EventInfo)
{
LV_GetText(SelectedText, RowNumber, 1)
Gui, Destroy
MsgBox, % RowNumber "," SelectedText
}
Return
GuiEscape:
GuiClose:
ExitApp
lvCtrl_SetRowHeight(Height) {
LV_SetImageList( DllCall( "ImageList_Create", Int,2, Int, Height, Int,0x18, Int,1, Int,1 ), 1 )
}
lvCtrl_SetWindowTheme(hLV) {
DllCall("UxTheme.dll\SetWindowTheme", "Ptr", hLV, "WStr", "Explorer", "Ptr", 0)
GuiControl, +LV0x14000, %hLV%
}
Who is online
Users browsing this forum: No registered users and 283 guests