Splitter: Correctly update the mouse cursor when the arrangement changes.
[GB.GUI.BASE] * BUG: Splitter: Correctly update the mouse cursor when the arrangement changes.
This commit is contained in:
parent
0ef56cfe48
commit
a879b7313c
4 changed files with 28 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue