Thank you for the feedback, it's good to know that this class is being useful.
seems to work. You just can't forget to implement OnNotify()
. I have found your description interesting and thought I should include an example of split panels with resizable controls in the repo.
This is the new demo, it should help you get this splitter done. I've set a few styles to make it look good for this purpose.
Code: Select all
; Example of Split Panels with resizable GUI and controls
Gui, LeftPanel:+HwndhLeft -Caption
Gui, LeftPanel:Add, DDL, vDList, Item1||Item2|Item3
Gui, LeftPanel:Add, ListBox, r10 vListB, Item1|Item2|Item3
Gui, RightPanel:+HwndhRight -Caption
Gui, RightPanel:Add, Tab2, h160 w100 vTabC, Tab A|Tab B|Tab C
Gui, Add, Custom, ClassReBarWindow32 hwndhSplitter vSplitWin w380 -Theme 0x0800 0x0040 0x8000 0x0008
Gui, Show, h200 w400
rbSplitter := New Rebar(hSplitter)
rbSplitter.InsertBand(hLeft, 0, "NoGripper", 10, "", 150, 0, "", 170, 80, 10)
rbSplitter.InsertBand(hRight, 0, "", 20, "", 150, 0, "", 170, 80, 10)
WM_NOTIFY := 0x4E
rbSplitter.ModifyBand(1, "MinHeight", (A_GuiHeight - 15))
rbSplitter.ModifyBand(2, "MinHeight", (A_GuiHeight - 15))
GuiControl, Move, SplitWin, % "W" (A_GuiWidth - 10) "H" (A_GuiHeight - 10)
GuiControl, LeftPanel:Move, DList, % "W" (A_GuiWidth - 25)
GuiControl, LeftPanel:Move, ListB, % "W" (A_GuiWidth - 25) "H" (A_GuiHeight - 40)
GuiControl, RightPanel:Move, TabC, % "W" (A_GuiWidth - 25) "H" (A_GuiHeight - 20)
The only thing that doesn't work when I make controls resizable is the minWidth of the bands... Probably another bug in MS control.
Let me know if you have more doubts.