diff --git a/comp/src/gb.gui.base/.project b/comp/src/gb.gui.base/.project index 48e09ef1c..142c1e4dd 100644 --- a/comp/src/gb.gui.base/.project +++ b/comp/src/gb.gui.base/.project @@ -1,6 +1,6 @@ # Gambas Project File 3.0 Title=Common controls and classes for GUI components -Startup=FTestListView +Startup=FTestSplit Version=3.15.90 VersionFile=1 Component=gb.image diff --git a/comp/src/gb.gui.base/.src/Split/Splitter.class b/comp/src/gb.gui.base/.src/Split/Splitter.class index c0565e512..1bcdcc8f6 100644 --- a/comp/src/gb.gui.base/.src/Split/Splitter.class +++ b/comp/src/gb.gui.base/.src/Split/Splitter.class @@ -72,6 +72,19 @@ End ' ' End +Private Sub UpdateMouse() + + Dim hResize As DrawingArea + Dim iMouse As Integer + + iMouse = If($bVertical, Mouse.SplitV, Mouse.SplitH) + + For Each hResize In $aResize + hResize.Mouse = iMouse + Next + +End + Public Sub Container_Arrange() Dim cNewWeight As Collection @@ -141,14 +154,14 @@ Public Sub Container_Arrange() With $aResize[I] .NoBackground = True .Raise - '.Background = Color.Yellow - .Mouse = If($bVertical, Mouse.SplitV, Mouse.SplitH) .Tag = I End With Next Me._Container = $hPanel Endif + UpdateMouse + Endif DoLayout @@ -474,5 +487,6 @@ Private Sub Arrangement_Write(Value As Integer) If bVertical = $bVertical Then Return $bVertical = bVertical DoLayout + UpdateMouse End diff --git a/comp/src/gb.gui.base/.src/Test/FTestSplit.class b/comp/src/gb.gui.base/.src/Test/FTestSplit.class index eb18662fc..9ca64e1be 100644 --- a/comp/src/gb.gui.base/.src/Test/FTestSplit.class +++ b/comp/src/gb.gui.base/.src/Test/FTestSplit.class @@ -14,3 +14,9 @@ Public Sub Form_Close() Settings.Write(HSplit1) End + +Public Sub Button1_Click() + + HSplit1.Arrangement = If(HSplit1.Arrangement = Arrange.Horizontal, Arrange.Vertical, Arrange.Horizontal) + +End diff --git a/comp/src/gb.gui.base/.src/Test/FTestSplit.form b/comp/src/gb.gui.base/.src/Test/FTestSplit.form index 915929fc1..22b7484eb 100644 --- a/comp/src/gb.gui.base/.src/Test/FTestSplit.form +++ b/comp/src/gb.gui.base/.src/Test/FTestSplit.form @@ -7,14 +7,17 @@ Arrangement = Arrange.Vertical { HBox1 HBox MoveScaled(6,3,47,4) + { Button1 Button + MoveScaled(0,0,16,4) + } } { Panel1 Panel MoveScaled(5,10,51,46) Expand = True Arrangement = Arrange.Fill Border = Border.Plain - { HSplit1 HSplit - MoveScaled(2,2,46,41) + { HSplit1 Splitter + MoveScaled(1,2,46,41) { TreeView1 TreeView MoveScaled(1,11,13,22) Visible = False