[Mono-bugs] [Bug 329718] New: Forms: ArgEx: "Cannot activate invisible...", when open color picker twice

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Oct 1 04:12:34 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=329718

           Summary: Forms: ArgEx: "Cannot activate invisible...", when open
                    color picker twice
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at ximian.com
          Found By: ---


Repro is SVN propertygrid/swf-propertygrid.cs   Open a color-picker twice, and
boom!  In steps, click BackColor drop-down, select ActiveCaption, say, and see
textbox at top of form change to match.  Click the BackColor drop-down again,
crash, exception below.

Don't know how this is related to bug 328930, but it's the same throw.

Tested on Win32 SVN head.

Exception:
[[
Unhandled Exception: System.ArgumentException: Cannot activate invisible or
disabled control.

at System.Windows.Forms.ContainerControl.set_ActiveControl
(System.Windows.Forms.Control) <0x0083d>
at System.Windows.Forms.Control.Select (System.Windows.Forms.Control) <0x000aa>
at System.Windows.Forms.Form.SelectActiveControl () <0x000ac>
at System.Windows.Forms.Form.WmActivate (System.Windows.Forms.Message&)
<0x00054>
at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message&) <0x000fb>
at ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x00014>
at ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x00022>
at System.Windows.Forms.NativeWindow.WndProc
(intptr,System.Windows.Forms.Msg,intptr,intptr) <0x0015c>
at System.Windows.Forms.XplatUIWin32.InternalWndProc
(intptr,System.Windows.Forms.Msg,intptr,intptr) <0x00046>
at (wrapper native-to-managed)
System.Windows.Forms.XplatUIWin32.InternalWndProc
(intptr,System.Windows.Forms.Msg,intptr,intptr) <0x0004d>
at (wrapper managed-to-native)
System.Windows.Forms.XplatUIWin32.Win32ShowWindow
(intptr,System.Windows.Forms.XplatUIWin32/WindowPlacementFlags) <0x00004>
at System.Windows.Forms.XplatUIWin32.SetVisible (intptr,bool,bool) <0x001cb>
at System.Windows.Forms.XplatUI.SetVisible (intptr,bool,bool) <0x0001f>
at System.Windows.Forms.Control.SetVisibleCore (bool) <0x0012f>
at System.Windows.Forms.Form.SetVisibleCore (bool) <0x00135>
at System.Windows.Forms.Control.set_Visible (bool) <0x00023>
at System.Windows.Forms.Control.Show () <0x0000c>
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.Show ()
<0x00038>
at System.Windows.Forms.PropertyGridInternal.PropertyGridView.DropDownControl
(System.Windows.Forms.Control,bool) <0x00455>
at System.Windows.Forms.PropertyGridInternal.PropertyGridView.DropDownControl
(System.Windows.Forms.Control) <0x0000f>
at System.Drawing.Design.ColorEditor.EditValue
(System.ComponentModel.ITypeDescriptorContext,System.IServiceProvider,object)
<0x0096f>
at
System.Windows.Forms.PropertyGridInternal.PropertyGridView.SetPropertyValueFromUITypeEditor
(System.Drawing.Design.UITypeEditor) <0x000ff>
at
System.Windows.Forms.PropertyGridInternal.PropertyGridView.DropDownButtonClicked
(object,System.EventArgs) <0x0036e>
at
System.Windows.Forms.PropertyGridInternal.PropertyGridTextBox.dropdown_button_Click
(object,System.EventArgs) <0x00050>
at System.Windows.Forms.Control.OnClick (System.EventArgs) <0x00050>
at System.Windows.Forms.Button.OnClick (System.EventArgs) <0x00037>
at System.Windows.Forms.ButtonBase.OnMouseUp
(System.Windows.Forms.MouseEventArgs) <0x00132>
at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs)
<0x0000d>
at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message&)
<0x0016f>
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&)
<0x00200>
at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message&)
<0x00067>
at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message&)
<0x0000d>
at ControlWindowTarget.OnMessage (System.Windows.Forms.Message&) <0x00014>
at ControlNativeWindow.WndProc (System.Windows.Forms.Message&) <0x00022>
at System.Windows.Forms.NativeWindow.WndProc
(intptr,System.Windows.Forms.Msg,intptr,intptr) <0x0015c>
at System.Windows.Forms.XplatUIWin32.InternalWndProc
(intptr,System.Windows.Forms.Msg,intptr,intptr) <0x00046>
at (wrapper native-to-managed)
System.Windows.Forms.XplatUIWin32.InternalWndProc
(intptr,System.Windows.Forms.Msg,intptr,intptr) <0x0004d>
at (wrapper managed-to-native)
System.Windows.Forms.XplatUIWin32.Win32DispatchMessage
(System.Windows.Forms.MSG&) <0x00004>
at System.Windows.Forms.XplatUIWin32.DispatchMessage
(System.Windows.Forms.MSG&) <0x0000a>
at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG&)
<0x00015>
at System.Windows.Forms.Application.RunLoop
(bool,System.Windows.Forms.ApplicationContext) <0x00348>
at System.Windows.Forms.Application.Run
(System.Windows.Forms.ApplicationContext) <0x0000c>
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00022>
at MWFTestApplication.MainWindow.Main (string[]) <0x0003a>
]]


Could we also make a change to the sample code to fix its layout:
[[
Index: D:/cygwin/usr/src/mono/winforms/propertygrid/swf-propertygrid.cs
===================================================================
--- D:/cygwin/usr/src/mono/winforms/propertygrid/swf-propertygrid.cs   
(revision 86630)
+++ D:/cygwin/usr/src/mono/winforms/propertygrid/swf-propertygrid.cs   
(working copy)
@@ -27,13 +27,12 @@

                        propertygrid = new PropertyGrid();
                        propertygrid.CommandsVisibleIfAvailable = true;
-                       propertygrid.Location = new Point(0,
textbox.PreferredHeight + 10);
                        propertygrid.Dock = DockStyle.Fill;
                        propertygrid.TabIndex = 2;
                        propertygrid.Text = "Property Grid";
-                       propertygrid.Dock = DockStyle.Fill;

                        this.Controls.Add(propertygrid);
+                       Controls.SetChildIndex (propertygrid, 0); //fix
Dock.Fill order

                        propertygrid.SelectedObject = textbox;
]]


-- 
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