Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>That isn't implemented. If you'd like that feature, it's best you derive the SplitContainer and override the OnPaint method.</p> <hr> <p><strong>Update 1</strong></p> <p>Here's some code to do what you requested. It is in VB.NET and the dot placement can do with some tweaking. Overall, the code works as expected.</p> <pre class="lang-vb prettyprint-override"><code>Imports System.Windows.Forms Imports System.ComponentModel Imports System.Drawing Public Class SplitContainerEx Inherits SplitContainer ''' &lt;summary&gt;Determines the thickness of the splitter.&lt;/summary&gt; &lt;DefaultValue(GetType(Integer), "5"), Description("Determines the thickness of the splitter.")&gt; _ Public Overridable Shadows Property SplitterWidth() As Integer Get Return MyBase.SplitterWidth End Get Set(ByVal value As Integer) If value &lt; 5 Then value = 5 MyBase.SplitterWidth = value End Set End Property Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) MyBase.OnPaint(e) 'paint the three dots Dim points(2) As Point Dim pointRect = Rectangle.Empty 'calculate the position of the points If Orientation = Windows.Forms.Orientation.Horizontal Then points(0) = New Point((MyBase.Width \ 2), SplitterDistance + (SplitterWidth \ 2)) points(1) = New Point(points(0).X - 10, points(0).Y) points(2) = New Point(points(2).X + 10, points(0).Y) pointRect = New Rectangle(points(1).X - 2, points(1).Y - 2, 25, 5) Else points(0) = New Point(SplitterDistance + (SplitterWidth \ 2), (MyBase.Height \ 2)) points(1) = New Point(points(0).X, points(0).Y - 10) points(2) = New Point(points(0).X, points(0).Y + 10) pointRect = New Rectangle(points(1).X - 2, points(1).Y - 2, 5, 25) End If e.Graphics.FillRectangle(Brushes.Gray, pointRect) For Each p In points p.Offset(-1, -1) e.Graphics.FillEllipse(Brushes.Black, New Rectangle(p, New Size(3, 3))) Next End Sub End Class </code></pre> <hr> <p><strong>Update 2</strong></p> <p>I'm putting up the C# equivalent because you tagged your question so.<br> If <code>vb makes you sick</code>, learn to head over to <a href="http://www.developerfusion.com/tools/convert/vb-to-csharp/" rel="nofollow" title="Convert VB.NET to C# - A free code conversion tool - developer Fusion">Convert VB.NET to C# - Developer Fusion</a> and do the VB to C# conversion.</p> <pre class="lang-cs prettyprint-override"><code>using System; using System.Diagnostics; using System.Windows.Forms; using System.ComponentModel; using System.Drawing; public class SplitContainerEx : SplitContainer { /// &lt;summary&gt;Determines the thickness of the splitter.&lt;/summary&gt; [DefaultValue(typeof(int), "5"), Description("Determines the thickness of the splitter.")] public virtual new int SplitterWidth { get { return base.SplitterWidth; } set { if (value &lt; 5) value = 5; base.SplitterWidth = value; } } protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { base.OnPaint(e); //paint the three dots Point[] points = new Point[3]; Rectangle pointRect = Rectangle.Empty; //calculate the position of the points if (Orientation == System.Windows.Forms.Orientation.Horizontal) { points[0] = new Point((int)(base.Width / 2), SplitterDistance + (int)(SplitterWidth / 2)); points[1] = new Point(points[0].X - 10, points[0].Y); points[2] = new Point(points[2].X + 10, points[0].Y); pointRect = new Rectangle(points[1].X - 2, points[1].Y - 2, 25, 5); } else { points[0] = new Point(SplitterDistance + (int)(SplitterWidth / 2), (int)(base.Height / 2)); points[1] = new Point(points[0].X, points[0].Y - 10); points[2] = new Point(points[0].X, points[0].Y + 10); pointRect = new Rectangle(points[1].X - 2, points[1].Y - 2, 5, 25); } e.Graphics.FillRectangle(Brushes.Gray, pointRect); foreach (Point p in points) { p.Offset(-1, -1); e.Graphics.FillEllipse(Brushes.Black, new Rectangle(p, new Size(3, 3))); } } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload