c# - How to add grab handle in Splitter of SplitContainer -


there used 3 dots in splitter bar of splitcontainer. there 3 lines in question details text box on stackoverflow shows can grabbed. how can splitter bar of splitcontainer in .net?

not have against alex's answer, thought i'd share solution looks bit nicer me (on xp machine anyway?).

private void splitcontainer_paint(object sender, painteventargs e) {     var control = sender splitcontainer;     //paint 3 dots'     point[] points = new point[3];     var w = control.width;     var h = control.height;     var d = control.splitterdistance;     var sw = control.splitterwidth;      //calculate position of points'     if (control.orientation == orientation.horizontal)     {         points[0] = new point((w / 2), d + (sw / 2));         points[1] = new point(points[0].x - 10, points[0].y);         points[2] = new point(points[0].x + 10, points[0].y);     }     else     {         points[0] = new point(d + (sw / 2), (h / 2));         points[1] = new point(points[0].x, points[0].y - 10);         points[2] = new point(points[0].x, points[0].y + 10);     }      foreach (point p in points)     {         p.offset(-2, -2);         e.graphics.fillellipse(systembrushes.controldark,             new rectangle(p, new size(3, 3)));          p.offset(1, 1);         e.graphics.fillellipse(systembrushes.controllight,             new rectangle(p, new size(3, 3)));     } } 

hope pleases someone? haa!


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -