VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.NET Properties

3 REPLIES 3
Reply
Message 1 of 4
HJohn
178 Views, 3 Replies

.NET Properties

I created a custom control inheriting the Control Class. I added the necessary properties for it and now I would like to hide some of the base Class properties, BackColor for instance. I tried using the attribute Browsable(False) on an override of the BackColor property, but didn't work. I think I read somewhere that the base properties can be hidden from the property box, but I can find it now. Can someone help me on this? Any ideas or solutions will be greatly appreciated.
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: HJohn

It can be done with a custom type converter class. Create a class that inherits from TypeConverter. Override the GetPropertiesSupported() method and have it return true. Then override the GetProperties() method. Here you can get a collection of property descriptors that your control exposes by calling TypeDescriptor.GetProperties(value, attributes, true). You can filter this collection to remove property descriptors that you want to hide and return the filtered collection. Set your control class to use your custom type converter with the TypeConverter attribute. -- Bobby C. Jones "HJohn" wrote in message news:31786768.1092400473289.JavaMail.jive@jiveforum1.autodesk.com... > I created a custom control inheriting the Control Class. I added the necessary properties for it and now I would like to hide some of the base Class properties, BackColor for instance. I tried using the attribute Browsable(False) on an override of the BackColor property, but didn't work. I think I read somewhere that the base properties can be hidden from the property box, but I can find it now. Can someone help me on this? Any ideas or solutions will be greatly appreciated.
Message 3 of 4
nyutzy
in reply to: HJohn

Hello,
I've been attempting to use a Microsoft PropertyGrid control in AutoCAD and am having trouble when creating a custom editor (UITypeEditor). The code functions well outside of AutoCAD, but when executed in AutoCAD none of the dropdown buttons appear.

I noticed that you are using a class with a TypeConverter. Have you experienced any problems in your efforts to implement your custom type converter class? Any suggestions?

Thanks in advance!
Nate
Message 4 of 4
Aaron_Pieler
in reply to: HJohn

Hi. I have the same problem with TypeEditors.
Did you solve it?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost