Author: jackson
Date: 2005-05-03 11:52:56 -0400 (Tue, 03 May 2005)
New Revision: 43936
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
Log:
* Splitter.cs: No decorations for the splitter form. Cache the
hatch brush.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-05-03 15:14:21 UTC (rev 43935)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-05-03 15:52:56 UTC (rev 43936)
@@ -1,5 +1,10 @@
2005-05-03 Jackson Harper <[EMAIL PROTECTED]>
+ * Splitter.cs: No decorations for the splitter form. Cache the
+ hatch brush.
+
+2005-05-03 Jackson Harper <[EMAIL PROTECTED]>
+
* TreeView.cs: Use dashed lines to connect nodes. Use the
ControlPaint method for drawing the focus rect instead of doing
that in treeview.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
2005-05-03 15:14:21 UTC (rev 43935)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
2005-05-03 15:52:56 UTC (rev 43936)
@@ -465,23 +465,40 @@
#endregion
#region Private Class
- public class SplitterForm : System.Windows.Forms.Form
+ public class SplitterForm : Form
{
+ private HatchBrush hatch;
+
public SplitterForm()
{
-
SetStyle (ControlStyles.UserPaint, true);
SetStyle (ControlStyles.AllPaintingInWmPaint,
true);
// TODO: This has to be here, or the form
doesn't draw right
this.MinimumSize = new System.Drawing.Size(1,
1);
this.Text = "Form2";
+
+ hatch = new HatchBrush
(HatchStyle.SmallCheckerBoard, Color.White, Color.Black);
+ }
+
+ protected override CreateParams CreateParams {
+ get {
+ CreateParams cp;
+
+ cp = base.CreateParams;
+
+ cp.Style = (int)WindowStyles.WS_POPUP;
+ cp.Style |=
(int)WindowStyles.WS_CLIPSIBLINGS;
+
+ cp.ExStyle = (int)
WindowStyles.WS_EX_TOPMOST;
+
+ return cp;
+ }
}
protected override void OnPaint(PaintEventArgs e)
{
- //TODO: The HatchBrush should be cached
- e.Graphics.FillRectangle(new
HatchBrush(HatchStyle.SmallCheckerBoard,
Color.White,Color.Black),ClientRectangle);
+ e.Graphics.FillRectangle
(hatch,ClientRectangle);
base.OnPaint (e);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches