Unplanned
Last Updated: 19 Jun 2017 11:00 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 03 May 2017 12:16
Category: SplitContainer
Type: Bug Report
1
FIX. RadSplitContainer - the splitter position is not restored correctly after using the MoveSplitter method to collapse a SplitPanel
To reproduce: add a RadSplitContainer with 3 identical SplitPanels. The left panel needs to be initially collapsed. That is why we use the introduced public API (MoveSplitter method). When the form is shown and you try to expand the left (yellow) panel, you will notice that the splitter is not restored to the correct position. Please refer to the attached gif file.

This must be handled for Vertical and Horizontal orientation!!!

Workaround:

Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    AddHandler Me.RadSplitContainer1.MouseDown, AddressOf SplitContainerMouseDown
End Sub
Private Sub SplitContainerMouseDown(sender As Object, e As MouseEventArgs)
    Dim clickedElement = Me.RadSplitContainer1.ElementTree.GetElementAtPoint(e.Location)
    If TypeOf clickedElement Is SplitterElement Or TypeOf (clickedElement.Parent) Is SplitterElementLayout Then
        RadSplitContainer1.RestoreSplitterPosition(Me.RadSplitContainer1.Splitters(0))
        RemoveHandler Me.RadSplitContainer1.MouseDown, AddressOf SplitContainerMouseDown
    End If
End Sub
0 comments