Splitter [v1.6]

Author: majkinetor Last Modified: nonexistent


Splitter is control that is created between controls that need to have dynamic separation.

Splitter(hSep "Handler", Handler)
Splitter_Add(Opt="", Text="", Handler="")
Splitter_Add2Form(HParent, Txt, Opt)
Splitter_GetMax(HSep)
Splitter_GetMin(HSep)
Splitter_GetPos( HSep, Flag="" )
Splitter_GetSize(HSep)
Splitter_Set( HSep, Def, Pos="", Limit=0.0 )
Splitter_SetPos(HSep, Pos, bInternal=false)
Splitter_updateFocus(Hwnd)
Splitter_wndProc(Hwnd, UMsg, WParam, LParam)

For more details of the functions's parameters and return value, please see it's source code.

Remarks

This module is part of the Forms Framework package.

For update's details and remarks related to the functions, please see the AutoHotkey Forum: http://www.autohotkey.com/forum/viewtopic.php?t=53317

License

The functions is an open source item under the BSD license. For details, please see http://creativecommons.org/licenses/BSD/

Example

; #Include Win.ahk
; #Include Splitter.ahk
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

    w := 500, h := 600, sep := 5
    w1 := w//3, w2 := w-w1 , h1 := h // 2, h2 := h // 3

    Gui, Margin, 0, 0
    Gui, Add, Edit, HWNDc11 w%w1% h%h1%
    Gui, Add, Edit, HWNDc12 w%w1% h%h1%
    hSepV := Splitter_Add( "x+0 y0 h" h " w" sep )
    Gui, Add, Monthcal, HWNDc21 w%w2% h%h2% x+0
    Gui, Add, ListView, HWNDc22 w%w2% h%h2%, c1|c2|c3
    Gui, Add, ListBox,  HWNDc23 w%w2% h%h2% , 1|2|3

    sdef = %c11% %c12% | %c21% %c22% %c23%          ;vertical splitter.
    Splitter_Set( hSepV, sdef )

    Gui, show, w%w% h%h%
return

GuiClose:
ExitApp