[AHK Test Build - 5th Nov 2015] Scrollbars, GuiControl Auto-Position+Size system, and more!

Discuss the development of AutoHotkey_H
HotKeyIt
Posts: 1551
Joined: 29 Sep 2013, 18:35
Contact:

Re: [AHK Test Build - 11th Oct 2015] +Scroll option to enable ScrollBars for Guis / Auto-Positioning and Resizing system

13 Oct 2015, 00:17

Bruttosozialprodukt wrote:And here is another thing: http://i.snag.gy/8gM1f.jpg
This GUI does not resize or anything and chances are that I'll never change it again because changing one thing means changing everything.
I'd really to rewrite this whole thing to have the left side being able to resize in width and everything to resize in height when changing the window size.
And I'd also like to not worry about margins between any controls and have elements easily scaled to 100% (minus margins) inside a group box etc..

Do you mean like this?

Code: [Select all] [Download] GeSHi © Codebox Plus

Gui,+Resize +Scroll
Gui, Add, Edit, w500 h400 aw ah
Gui, Add, ListView,x+10 w100 h200 axa ah1/3,Season
Gui, Add, ListView,x+10 w200 h200 axa aha,Episode
Gui, Add, Edit, xp-110 yp+210 w310 axa aha aya
Gui, Add, ListView, yp+30 w310 h160 aya axa aha,Hoster|Source|Language|Url
Gui, Show, x0
return
GuiClose:
ExitApp


EDIT:
You can even use negative values to make right part smaller:

Code: [Select all] [Download] GeSHi © Codebox Plus

#SingleInstance force
Gui,+Resize +Scroll +MaxSize880x600
Gui, Add, Edit, w500 h400 aw5 ah
Gui, Add, ListView,x+10 w100 h200 axa aw-1 ah1/3,Season
Gui, Add, ListView,x+10 w200 h200 axa aw-3 aha,Episode
Gui, Add, Edit, xp-110 yp+210 w310 ax aw-4 aha aya
Gui, Add, ListView, yp+30 w310 h160 axp aya awa aha,Hoster|Source|Language|Url
Gui, Show, x0
return
GuiClose:
ExitApp
Bruttosozialprodukt
Posts: 451
Joined: 24 Jan 2014, 22:28

Re: [AHK Test Build - 11th Oct 2015] +Scroll option to enable ScrollBars for Guis / Auto-Positioning and Resizing system

13 Oct 2015, 00:44

I have to admit, this is pretty darn impressive. But I can't use column headers in every listview unfortunately. Would this be possible with the group boxes as well?
User avatar
Soft
Posts: 174
Joined: 07 Jan 2015, 13:18
GitHub: visionary1
Location: Seoul
Contact:

Re: [AHK Test Build - 11th Oct 2015] +Scroll option to enable ScrollBars for Guis / Auto-Positioning and Resizing system

14 Oct 2015, 14:40

super awesome!! I always had this dream
AutoHotkey & AutoHotkey_H v1.1.22.07
User avatar
evilC
Posts: 3600
Joined: 27 Feb 2014, 12:30

Re: [AHK Test Build - 11th Oct 2015] +Scroll option to enable ScrollBars for Guis / Auto-Positioning and Resizing system

14 Oct 2015, 15:42

Zip updated with fix for mouse wheel.
When the focus is in a control with a scrollbar, but the mouse is outside it, the parent is scrolled.

Test Script:

Code: [Select all] [Download] GeSHi © Codebox Plus

#SingleInstance force
Gui,+Resize +Scroll
Gui, Add, Edit, w120 w100 ah h200, Edit01`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n`n

Gui, Show, x0
return
GuiClose:
ExitApp
User avatar
evilC
Posts: 3600
Joined: 27 Feb 2014, 12:30

Re: [AHK Test Build - 17th Oct 2015] Scrollbars, GuiControl Auto-Position+Size system, and more!

17 Oct 2015, 09:26

New build released, zip updated.

Improvements to the handling of mouse wheel scrolling - a control will only consume a scroll message if the cursor and focus is inside it and it has the relevant scrollbar showing (comple with a thumbtrack, not just an empty scrollbar).
Otherwise, the code keeps grabbing the parent HWND until it finds something with scrollbars.

Test script:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Place the cursor and/or focus in Test2 and notice that you can scroll the main gui with the wheel.
Focus in Test1, cursor in Test2 - main gui is scrolled.
User avatar
evilC
Posts: 3600
Joined: 27 Feb 2014, 12:30

Re: [AHK Test Build - 17th Oct 2015] Scrollbars, GuiControl Auto-Position+Size system, and more!

17 Oct 2015, 13:54

New build, updated zip.

If the scrollbars of a control reach their limits, scrolling in that direction passes the scroll to the parent.

eg if scrollbar is at top and you scroll the wheel up, the parent gets scrolled.

Test script: Same as last post.
Place mouse + focus in Test1 - when the scrollbars reach the end, the parent is scrolled.
toralf
Posts: 432
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: [AHK Test Build - 5th Nov 2015] Scrollbars, GuiControl Auto-Position+Size system, and more!

30 Nov 2015, 02:54

great, thanks a lot.
ciao
toralf
Heezea
Posts: 49
Joined: 30 Sep 2013, 21:33

Re: [AHK Test Build - 5th Nov 2015] Scrollbars, GuiControl Auto-Position+Size system, and more!

01 Dec 2015, 08:58

Guys, amazing job. I'm holding out finishing a script until this makes it into the mainstream AHK version. Thanks so much for the effort, it's looking sweet.

Is it possible to use this so that when you are holding down the left mouse button (as if dragging an icon) and you move towards the edge of the GUI, that it would automatically scroll? Perhaps if you mouse over the "margin"? I'm envisioning this the same way windows explorer allows you to drag a file around in a directory.
User avatar
evilC
Posts: 3600
Joined: 27 Feb 2014, 12:30

Re: [AHK Test Build - 5th Nov 2015] Scrollbars, GuiControl Auto-Position+Size system, and more!

01 Dec 2015, 14:20

I wouldn't hold your breath for too long, we have not even approached lexikos yet about incorporating these additions, and we are still finding bugs and issues with it, so until we have a stable build that we are happy with, it's not gonna happen.
If you wish to keep up-to-date with the latest AHK_L changes whilst taking advantage of these new additions, then you can just use the AHK_H v1 executable. HotkeyIt pulls the changes in from AHK_L as they happen, so you get the best of both worlds. AHK_H is a superset of AHK_L, and should be 100% compatible.

Regarding the drag question - no, not at the moment. This is, however, something that I may want to be doing in my own project (It would be nice if you could drag reorder plugins), so there is hope for you yet :)
lexikos
Posts: 5457
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: [AHK Test Build - 5th Nov 2015] Scrollbars, GuiControl Auto-Position+Size system, and more!

01 Dec 2015, 22:32

Off topic: No, AHK_H is not 100% compatible. There is at least one script which won't load because of a conflict with the new "null" constant. #NoEnv is the default behaviour, and I think any script containing the directive won't load (but I could be wrong). There are probably other minor issues.
kinnex
Posts: 22
Joined: 09 Jun 2016, 07:52

Re: [AHK Test Build - 5th Nov 2015] Scrollbars, GuiControl Auto-Position+Size system, and more!

16 Aug 2016, 15:50

I just stumbled onto this while trying to figure out if it is possible to increase the size of scroll bars for DropDownLists. This looks amazing. Have there been any updates since 12/2015?
User avatar
lmstearn
Posts: 135
Joined: 11 Aug 2016, 02:32
GitHub: lmstearn

Re: [AHK Test Build - 5th Nov 2015] Scrollbars, GuiControl Auto-Position+Size system, and more!

09 Sep 2016, 02:06

Looks very useful. :) Noticed that Anchor got nuked (?) as the last script on this page doesn't work on 112401. Time to port over to V2 at this stage?
:arrow: itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH

Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest