[Mono-bugs] [Bug 363555] New: ToolStrip crash if ContentPanel. BackColor set to transparent
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Feb 21 04:42:41 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=363555
Summary: ToolStrip crash if ContentPanel.BackColor set to
transparent
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: andyhume32 at yahoo.co.uk
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Found in the samples from the book "Windows Forms 2.0 Programming," by Chris
Sells and Michael Weinhardt, sources available from
http://www.sellsbrothers.com/writing/wfbook/ Reminded of it by bug 363303.
Small repro program, and exception ToString below.
[[
mono --debug WinForms/Menu-\ ToolStrip/TscContentPanelBackColorTransparent.exe
Unhandled Exception: System.ArgumentException: Transparent background colors
are not supported on this control
at System.Windows.Forms.Control.set_BackColor (Color value) [0x00067] in
D:\cygwin\usr\src\mono\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2285
at System.Windows.Forms.ToolStripContentPanel.set_BackColor (Color value)
[0x00012] in
D:\cygwin\usr\src\mono\mcs\class\Managed.Windows.Forms\System.Windows.Forms\ToolStripContentPanel.cs:110
at TscContentPanelBackColorTransparent.Main () [0x00000]
]]
[[
using System;
using System.Windows.Forms;
using System.Drawing;
public static class TscContentPanelBackColorTransparent
{
static void Main()
{
Form f = new Form();
ToolStripContainer toolStripContainer1 = new ToolStripContainer();
//
// Crash at this line in current Mono.
toolStripContainer1.ContentPanel.BackColor = Color.Transparent;
//
// Add some content etc so its apparent when it's working.
toolStripContainer1.Dock = DockStyle.Fill;
MenuStrip menuStrip1 = new MenuStrip();
ToolStripMenuItem fileToolStripMenuItem = new ToolStripMenuItem();
fileToolStripMenuItem.Text = "&File";
menuStrip1.Items.Add(fileToolStripMenuItem);
toolStripContainer1.TopToolStripPanel.Controls.Add(menuStrip1);
toolStripContainer1.TopToolStripPanel.Controls.Add(new ToolStrip());
toolStripContainer1.BottomToolStripPanel.Controls.Add(new
StatusStrip());
f.Controls.Add(toolStripContainer1);
Application.Run(f);
}
}
]]
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list