Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[module] Scroller 1.0


  • Please log in to reply
9 replies to this topic
majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
S c r o l l e r
Makes window scrollable.


Download          Documentation


Posted Image

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
The changes over Lexikos code are as follows:

[*:9s4paeyg] Properly calculates scrollable area, taking into account system and window specific settings (title height, border size, gui margin, scrollbar size)
[*:9s4paeyg] Works within container control (Panel, or anything else) by simply calling Scroll_onScroll handler. This gives you option of multiple scrollable subwindows inside main window. You will be able to use it also as a handler for Scrollbar custom control for maximum customization of scrollbar appearance.
[*:9s4paeyg] Documentation.
[*:9s4paeyg] Modularized - easy to plug-in in your code.
Again, great thing Lexikos. Thx man.
Posted Image

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
This is the picture of scrollable Panel which will soon be available for usage.

Posted Image
Posted Image

hughman
  • Members
  • 192 posts
  • Last active: Feb 14 2016 06:59 AM
  • Joined: 11 Feb 2007
wow, you're my idol, man.

Thrawn
  • Members
  • 30 posts
  • Last active: Apr 05 2011 06:07 PM
  • Joined: 12 May 2008

This is the picture of scrollable Panel which will soon be available for usage.

i'd love that feature. can't wait to use it.

HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
Hi majkinetor, can't believe I did not tell you many thanks for this and how great it is, thank you :)

I've got one small problem, how would I exclude a ToolBar or any other controls from scrolling, is this possible at all without a second gui?

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
You need to use Panels (see pic above). Try with Forms framework then copy the Forms modules u used to your inc folder (including _Forms.ahk so if you add more framework modules later, you don't have to mess with includes).

Toolbar on top, everything else in panel bellow. Then, you set the panel to be scrollable (see its scroll style).
Posted Image

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
The sample:

_()
    w := 500, h := 400
    hForm  := Form_New("Resize e3 w500 h400")

    hToolbar := Form_Add(hForm, "Toolbar", "cut`ncopy`npaste`nredo`nundo", "gOnToolbar style=flat il=3")
    hPanel   := Form_Add(hForm, "Panel", "", "x5 y50 w" w-15 " h" h-55, "Attach w h")

    Loop, 10
        Form_Add(hPanel, "Edit", "Edit " A_Index, "vscroll R5 H100 W200")

    Panel_SetStyle(hPanel, "scroll")
    Form_Show()
return 

#include inc
#include _Forms.ahk

Posted Image

luetkmeyer
  • Members
  • 38 posts
  • Last active: Jul 01 2011 04:11 PM
  • Joined: 26 Feb 2010
Thank you.

  • Guests
  • Last active:
  • Joined: --
Firstly thanks for your work on creating this project.

I am a new user of AHK and I am trying to get a GUI windows that contains many fields to scroll up and down. i see you implementation is on the contents of the GUI windows such as the text boxes and forms. Is there any change someone can give me an example on how to apply this script to a basic GUI window?

If anyone can help it would be really appreciated!

Cheers from Australia!