Completed
Last Updated: 15 Aug 2017 11:03 by ADMIN
The mouse cursor should not also change to split.

How to reproduce: set certain splitter elements to be fixed, then you would notice that they have the resizing image visible and the cursor changes to split if you hover them

Workaround: manually hide the layout element and use a custom control overriding its Cursor property
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        new RadControlSpyForm().Show();

        this.radSplitContainer1.EnableCollapsing = true;
        this.radSplitContainer1.UseSplitterButtons = true;
    }

    protected override void OnShown(EventArgs e)
    {
        base.OnShown(e);

        foreach (SplitterElement splitter in this.radSplitContainer1.Splitters)
        {
            splitter.Fixed = true;
            splitter.Layout.Visibility = ElementVisibility.Collapsed;
        }
    }

    private void button1_Click(object sender, EventArgs e)
    {
        foreach (SplitterElement splitter in this.radSplitContainer1.Splitters)
        {
            splitter.Fixed = !splitter.Fixed;
            splitter.Layout.Visibility = !splitter.Fixed ? ElementVisibility.Visible : ElementVisibility.Collapsed;
        }
    }
}

public class MyRadSplitContainer : RadSplitContainer
{
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadSplitContainer).FullName;
        }
    }

    public override Cursor Cursor
    {
        get
        {
            return base.Cursor;
        }
        set
        {
            SplitterElement splitter = this.GetSplitterElementAtPoint(this.PointToClient(Cursor.Position));
            if (!(splitter != null && splitter.Fixed))
            {
                base.Cursor = value;
            }
        }
    }
}
Completed
Last Updated: 07 Oct 2020 15:39 by ADMIN
Release R3 2020 SP1

Backgroud

The behavior of split button makes me confused when I use split button collapsing the split panel. It locates in different position when I restore the split button by double-click. What's weirder is that double-click will make no effect when the split button located on the edge. I don't like these default behaviours.

Question

1. Do you know how to overwrite the default behaviour of split button?

2. Is there a virtual method or some event I can reimplement?

3. I want to collapse the right panel to the right side, and restore it to the initial location, and just these to behaviours. How can I do it?

Thanks!

Completed
Last Updated: 29 Apr 2022 13:39 by ADMIN
Release R2 2022

Dear Sir/Madam

Unfortunately, the SplitContainer in the .NET version 5 has problems, as you can see in the picture, I can not change the size in design time.

Is there a newer version that fixes this problem?

Telerik Winform Version :2020.3.1020

Visual Studio Version : 16.8.3

Best Regards

 

 

Completed
Last Updated: 05 Jan 2022 12:57 by ADMIN
Release R1 2022
  • Create a Radform1 with RadSplitContainers (Orientation H or V)
  • In the designer, click on the Split (or try to move it does'nt work according this feedback RadSplitContainer: problem in resizing split panels in design time in Net5)
  • This property is added to the RadForm1.Designer.cs

            this.radSplitContainer2.Cursor = System.Windows.Forms.Cursors.SizeNS;

  • Deleting this property and working with the designer add again the property.

A project to reproduce is attached

Thanks

1 2