[Mono-winforms-list] ControlPaint.DrawReversibleFrame not working?

Chris Toshok toshok at ximian.com
Tue May 22 18:44:08 EDT 2007


There's a problem with the color code, basically, in the X11
implementation.  If you replace Color.Black in your sample with
BackColor, it works.

Chris

On Tue, 2007-05-22 at 17:35 +0200, Jurek Bartuszek wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> I've noticed that System.Windows.Forms.ControlPaint.DrawReversibleFrame
> has recently been implemented. I've built and run the following code:
> 
> using System.Windows.Forms;
> using System.Drawing;
> 
> namespace Testing
> {
>         public class MainForm : Form
>         {
>                 public MainForm()
>                 {
>                         this.Text = "test";
>                         this.Width = 500;
>                         this.Height = 500;
>                 }
> 
>                 protected override void OnPaint(PaintEventArgs e)
>                 {
>                         Rectangle r = this.RectangleToScreen(this.Bounds);
> 			r.Offset(50, 50);
>                         ControlPaint.DrawReversibleFrame(r, Color.Black,
> FrameStyle.Thick);
>                 }
>         }
> 
>         public static class Entry
>         {
>                 public static void Main(string[] args)
>                 {
>                         Application.Run(new MainForm());
>                 }
>         }
> }
> 
> I know that OnPaint is not the best place to draw this frame, but that's
> solely for testing purposes and the result is that the frame is not
> being drawn at all. Any ideas what might be wrong?
> 
> Best regards,
> Jurek Bartuszek
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFGUw3e6l8uJkeTVlMRAleHAJ9BNNLZigG0EugStHVJYnYlr66e7wCgwBFx
> o1LToKNdYNHYDKoFBV29e1Q=
> =XXZI
> -----END PGP SIGNATURE-----
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list



More information about the Mono-winforms-list mailing list