I would like to have a header/title on top of property Grid like a frame. But I found only toolbarvisble option is available. How to have a header on a property Grid ? Thanks, Rajan
Varad_Rajan
Posts
-
Header/Title on Property Grid -
Category attribute in Property GridOk.. I need to expand all category or collapse all. I need to change the category name of "MiSC" to some thing meaningful Thanks
-
Category attribute in Property GridIs it possible to expand a particular category and collapse another particular category in property Grid ? How can we do it. Also if I do not have category , MISC is shown as category . Is it possible to remove "Misc" Thanks , Rajan
-
How to dynamically add a "CheckBox" or "List Box " property Item to a Property Grid at runtime ?I have a requirement to add dynamically a list box or checkbox to a propertygrid at runtime. I do not know at compile time what type of property items to be added to property Grid. I am able to achieve to add dynamically a simple property item like a text by overriding the "PropertyDescriptor" Class in my customdescriptor class. But how to add in similar way a checkbox or listbox to propertygrid dynamically ? I was not successfull till now. But I can achieve the same thing for example adding a checkbox property item at compile time(without overriding PropertyDescriptor) by using UiTypeEditor like: public class CheckBoxTest : System.Drawing.Design.UITypeEditor { public override bool GetPaintValueSupported(ITypeDescriptorContext context) { return true; } public override void PaintValue(System.Drawing.Design.PaintValueEventArgs e) { System.Windows.Forms.ControlPaint.DrawCheckBox(e.Graphics, e.Bounds, ((CustomProperty)e.Context.Instance).checkValue ? ButtonState.Checked : ButtonState.Normal); } } But If I try to achieve the above to be executed at runtime by overriding "PropertyDescriptor" These functions are not called. Can anyone have any idea ? Thanks, Rajan
-
Custom Task Pane Close Button.I am using a CutomTask Pane in Excel as an C# .NET ADDIN. The custom task pane has a close button(X) at the right corner. I need to not allow the user to close the Task Pane or disable the Close button(X) . Can anyone have any idea ? Is there any way to trap the close(X) button and prevent user from closing it ? I tried to trap the VisibaleStateChange event handler of Custom Task pane and try to show it again when user clicks the X button. But I am not successfull. I am using the CreateCTP() COM function to create a custom task pane. Thanks, Rajan
-
In Excel worskheet how to find out that a particulat cell is selected or not ?In the Excel worksheet, WHen user selects cells randomly with CTRL key pressed , I need to get those cell inormation like row/column position and data in those cells. I am able to do this when the user selects the cells sequentially like index 0,1,2 ..etc with the help of Worksheet range object. But If I do the same selection of cells randomly using CTRL key, there is no range is available and I need to get the info of these cells. Hope I am clear now.. Thanks, Rajan
-
In Excel worskheet how to find out that a particulat cell is selected or not ?In Excel worskheet how to find out that a particulat cell is selected or not ?
-
How to get the row/column/data of cells selected in worksheet of Excel using C#I am trying to retrieve the all the cells selected by user in the worksheet of Excel using C#. Can anyone help ?
-
Dynamically add a property item to Property GridI am trying to add propertyitem dynamically to property grid. For example If I want to add a property Item Like a text box which takes "String name" as variable how to add dynamically to property Grid? I can do the following to add the "name" text box at static design time: public class PropertyGridProcessDesigner { [Editor(typeof(PropertyGridProcessDesigner), typeof(System.Drawing.Design.UITypeEditor))] public string Name { get { return name; } set { name= value; } } } But how to achieve the same above thing at run time ? Do we need to create dynamic classes to add Property Item ? If so, can anyone please share any information you have ? Thanks, rajan
-
How to Dynamically add a property item to Property GridI am trying to add propertyitem dynamically to property grid. For example If I want to add a property Item Like a text box which takes "String name" as variable how to add dynamically to property Grid? I can do the following to add the "name" text box at static design time: public class PropertyGridProcessDesigner { [Editor(typeof(PropertyGridProcessDesigner), typeof(System.Drawing.Design.UITypeEditor))] public string Name { get { return name; } set { name= value; } } } But how to achieve the same above thing at run time ? Do we need to create dynamic classes to add Property Item ? If so, can anyone please share any information you have ? Thanks, rajan
-
How to remove description at the bottom of PropertyGridThanks for your Help . It worked. Not Sure Why in .NET they have did the property Like that !
-
How to remove description at the bottom of PropertyGridI created a Property Grid and it displays an description at the bottom. Can anyone please let me know hoe to remove it. I tried with Description(null) and descriptionattribute(null) , but still it shows the description Thanks !
-
How to disable keydown event in Context Menu Strip ?I tried Gareth , focusing, activating treeview But still the keydown control goes to ContextMenu. I tried to Minimize and Maximize the form programatically to make context menu lose focus but it is not working. Thanks
-
How to disable keydown event in Context Menu Strip ?My doubt is After the context menu is displayed, the context menu is still there even after I close it explicitly. When I minimize and maximize the form the keydown event is going back to treeview. But I am not able to achieve this programatically.
-
How to disable keydown event in Context Menu Strip ?You are right Gareth. It automatically appears as you said. But in certain situations for functional aspect I need to show or hide it. But the problem comes when I press key down after I show the context Menu. The control after that for keydown always goes to context menu. Why is not coming back to Treeview for Keydown.
-
How to disable keydown event in Context Menu Strip ?I am not using any event to display the context Menu Strip. It is declared as private System.Windows.Forms.ContextMenuStrip DimensionModify; in class designer of form When I add it in visual designer. I am using DimensionModify.show() or DimensionModify.Hide() to display or hide the contextMenu .
-
How to disable keydown event in Context Menu Strip ?Adding one more to thread... When I do the above and press Keydown in Treeview the application throws an exception saying arithmetic underflow or overflow error? Do you have any idea of this ? Thanks, Rajan
-
How to disable keydown event in Context Menu Strip ?Tnanks for your reply Gareth. I do not want anything to happen when I press Key down. I have added the contextMenuStrip in form at design time. I have displayed items in it and using the mouse click event for functionality. But when I press Key down event in context menu and when I go back to Treeview and press Key down the control is going to Contextmenu. It is supposed to go to Treeview. I am surprised why in keydown event control is going to Contextmenu when It has been closed . Hope you have got my problem .. Regards, Rajan
-
How to disable keydown event in Context Menu Strip ?I am using a contextmenuStrip in Treeview . The problem is When 1. Open Context menu strip by right clicking TreeNode. 2. Do not select any item in Context Menu Strip . 3. Select any TreeNode in Treeview . Now Context Menu Disappears. (This is fine) 4. Now press any keyboard Key . Nothing is working . The control is still with ContextMenuStrip popup menu even though it is has disappeared. How to solve this problem ?. How to disable the Key down event in ContextMemuStrip ? I am able to trap PreviewKeyDown event for ContextMenu but not able to diable Key Down event in Context Menu.
-
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