Properties Window in windows programming~ [modified]
-
Hello, everyone. I was working on a windows program with C#, and wanted to associate my PictureBox component with a ContextMenu. I searched into the Properties Windows, only to find a ContextMenuStrip property there instead of a ContextMenu. Then I was unable to set the property using the Properties Window which would otherwise save me a lot of troubles. So here comes my question. Since not all the properties of a component are displayed on the Properies Window, can I manually put the ContextMenu or some other property onto the Properties window? Or there's just no way for me to customize the Properties Window like that? :-O -- modified at 6:25 Saturday 20th October, 2007
-
Hello, everyone. I was working on a windows program with C#, and wanted to associate my PictureBox component with a ContextMenu. I searched into the Properties Windows, only to find a ContextMenuStrip property there instead of a ContextMenu. Then I was unable to set the property using the Properties Window which would otherwise save me a lot of troubles. So here comes my question. Since not all the properties of a component are displayed on the Properies Window, can I manually put the ContextMenu or some other property onto the Properties window? Or there's just no way for me to customize the Properties Window like that? :-O -- modified at 6:25 Saturday 20th October, 2007
ContextMenuStrip, is just a context menu, 'they' just changed the name a little. Make yourself a ContextMenu(Strip) then set your Picture boxes ContextMenu(Strip) to it. And in a situation where a property is not listed in the designer, and you KNOW its there, you can just add the line of code yourself, like: this.Thing.Attribute = Whatever; I don't think you can just add stuff tou the properties window like that. You'd have to inherit the base class, and add in the support for the designer.
My current favourite word is: Waffle Cheese is still good though.
-
ContextMenuStrip, is just a context menu, 'they' just changed the name a little. Make yourself a ContextMenu(Strip) then set your Picture boxes ContextMenu(Strip) to it. And in a situation where a property is not listed in the designer, and you KNOW its there, you can just add the line of code yourself, like: this.Thing.Attribute = Whatever; I don't think you can just add stuff tou the properties window like that. You'd have to inherit the base class, and add in the support for the designer.
My current favourite word is: Waffle Cheese is still good though.