How t get rid/hide True/false drop down List Box when check Box is used with it in Property Grid in C# .NET [modified]
-
I am using a property Grid with a check Box displayed as one of its item. I am able to display Check Box and check/Uncheck Items. But the problem is I am also getting a drop down List box with True/false along with check box. I need to get rid/hide this drop down List Box . Can any pne please let me know for the soultion if possible ? the code I am using for displying Check Box is: [Editor(typeof(CheckBoxInPropertyGridEditorTwoPassCalc), typeof(System.Drawing.Design.UITypeEditor))] public bool TwoPassCalculation { get { return twoPassCalculation; } set { twoPassCalculation = value; } } public class CheckBoxInPropertyGridEditorTwoPassCalc : UITypeEditor { public override bool GetPaintValueSupported(ITypeDescriptorContext context) { return true; } public override void PaintValue(PaintValueEventArgs e) { ControlPaint.DrawCheckBox(e.Graphics, e.Bounds, ((GeneralDimensionClass)e.Context.Instance).twoPassCalculation ? ButtonState.Checked : ButtonState.Normal); } }
modified on Wednesday, January 23, 2008 4:28:13 AM
-
I am using a property Grid with a check Box displayed as one of its item. I am able to display Check Box and check/Uncheck Items. But the problem is I am also getting a drop down List box with True/false along with check box. I need to get rid/hide this drop down List Box . Can any pne please let me know for the soultion if possible ? the code I am using for displying Check Box is: [Editor(typeof(CheckBoxInPropertyGridEditorTwoPassCalc), typeof(System.Drawing.Design.UITypeEditor))] public bool TwoPassCalculation { get { return twoPassCalculation; } set { twoPassCalculation = value; } } public class CheckBoxInPropertyGridEditorTwoPassCalc : UITypeEditor { public override bool GetPaintValueSupported(ITypeDescriptorContext context) { return true; } public override void PaintValue(PaintValueEventArgs e) { ControlPaint.DrawCheckBox(e.Graphics, e.Bounds, ((GeneralDimensionClass)e.Context.Instance).twoPassCalculation ? ButtonState.Checked : ButtonState.Normal); } }
modified on Wednesday, January 23, 2008 4:28:13 AM
Are you still working on this?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon