Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. 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]

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]

Scheduled Pinned Locked Moved C#
csharpgraphicscssdesignhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Varad_Rajan
    wrote on last edited by
    #1

    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

    P 1 Reply Last reply
    0
    • V Varad_Rajan

      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

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups