I'm finding forum references to adding "HScroll VScroll" to controls ("but not to text controls") and using "+Resize +0x300000" - but haven't been able to figure out how to apply to AHK V2 (sometimes I see scrollbars with the options I try, but they're grayed out and won't scroll).
Didn't find anything in the V2 vs. V1 documentation.
V2 doc says:
Gui.Add(ControlType [, Options, Text])
Options HScroll/VScroll: Provides a horizontal/vertical scroll bar if appropriate for this type of control.
But this doesn't work for me (i.e. no scrollbars):
Gui2.Add("Edit","HScroll VScroll", msg)
Help, please
Scrollbars for Gui object, AHK V2
Re: Scrollbars for Gui object, AHK V2
- Here are 2 examples.
- The scrollbars appear greyed out until you type enough text horizontally/vertically.
- The scrollbars appear greyed out until you type enough text horizontally/vertically.
Code: Select all
;AHK v2
#SingleInstance force
oGui := GuiCreate(, "MyWinTitle")
oGui.OnEvent("Close", "Gui_Close")
hGui := oGui.hWnd
oGui.Add("Edit", "w100 h100 +HScroll +VScroll", "EDIT 1")
oGui.Add("Edit", "w100 h100 r10 +HScroll +VScroll", "EDIT 2")
oGui.Show()
return
;==================================================
Gui_Close()
{
ExitApp()
}
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Scrollbars for Gui object, AHK V2
Thanks much! My problem: Omitting dimensions e.g. "w100 h100" seems to disable the scrollbars ; )
Re: Scrollbars for Gui object, AHK V2
- These work for me:
- Perhaps if you don't specify +Multi or r10 (or 'r' with another number) you're left with a single-line Edit control which can't be expanded, and so the vertical scrollbar doesn't become usable.
Code: Select all
;AHK v2
#SingleInstance force
oGui := GuiCreate(, "MyWinTitle")
oGui.OnEvent("Close", "Gui_Close")
hGui := oGui.hWnd
oGui.Add("Edit", "+Multi +HScroll +VScroll", "EDIT 1")
oGui.Add("Edit", "r10 +HScroll +VScroll", "EDIT 2")
oGui.Show()
return
;==================================================
Gui_Close()
{
ExitApp()
}
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Scrollbars for Gui object, AHK V2
Thanks
My expectations from reading the doc is that without width/height/row parameters, Edit control would be sized automatically which I find that it is, but no functioning scrollbars
My expectations from reading the doc is that without width/height/row parameters, Edit control would be sized automatically which I find that it is, but no functioning scrollbars