[Mono-bugs] [Bug 82735][Min] New - ToolStrip: null LayoutSettings when ToolStripLayoutStyle.Table

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Sep 7 11:27:06 EDT 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by andyhume32 at yahoo.co.uk.


--- shadow/82735	2007-09-07 11:27:06.000000000 -0400
+++ shadow/82735.tmp.27081	2007-09-07 11:27:06.000000000 -0400
@@ -0,0 +1,52 @@
+Bug#: 82735
+Product: Mono: Class Libraries
+Version: 1.2
+OS Details: 
+Status: NEW   
+Priority: Minor
+Component: Windows.Forms
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: andyhume32 at yahoo.co.uk               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: ToolStrip: null LayoutSettings when ToolStripLayoutStyle.Table
+Ok last one on ToolStrip/etc.  Not sure if its Minor because its in very 
+rarely used functionality, or Normal because it likely causes a crash 
+when the application expects a non-null value.  Might not be a one-line 
+type fix...?
+Repro is ./ch04_Layout/TableLayoutToolStripSample from the sample code 
+for the book "Windows Forms 2.0 Programming," by Chris Sells and Michael 
+Weinhardt, sources available from 
+Tested on SVN head on Win32, 1.2.5_5 Win32 and 1.2.5_5 Suse VM.
+LayoutSettings returns null when using ToolStripLayoutStyle.Table.  This 
+causes the sample to fail with a NRE.
+Code inspection shows this to be expected (and also for other styles?):
+   protected virtual LayoutSettings CreateLayoutSettings 
+(ToolStripLayoutStyle layoutStyle)
+   {
+     switch (layoutStyle) {
+       case ToolStripLayoutStyle.Flow:
+         return new FlowLayoutSettings ();
+       case ToolStripLayoutStyle.Table:
+         //return new TableLayoutSettings ();
+       case ToolStripLayoutStyle.StackWithOverflow:
+       case ToolStripLayoutStyle.HorizontalStackWithOverflow:
+       case ToolStripLayoutStyle.VerticalStackWithOverflow:
+       default:
+         return null;
+     }
+   }

More information about the mono-bugs mailing list