Hi,
I have widely used ToolStrip in my application. I created a UserControl which contains this ToolStrip. I would rather like to use inheritance:
MyCustomControl : ToolStrip
Everything seems to work fine, untill I want to set visibility to one of ToolStripItem - there are maybe 20 buttons and not all of my ChildForms which contains this MyCustomControl need all of them. I open in designer mode in Property window "Items", choose right one and than select "Visibility " > false. In designer mode button dissapear. When compile, designer is reloaded, button is back again.
If I code manually in constructor of ChildForm:
myCustomControl .Items["someButton "].Visible = false;
it worsk OK.
What would you advice me, please?
I have widely used ToolStrip in my application. I created a UserControl which contains this ToolStrip. I would rather like to use inheritance:
MyCustomControl : ToolStrip
Everything seems to work fine, untill I want to set visibility to one of ToolStripItem - there are maybe 20 buttons and not all of my ChildForms which contains this MyCustomControl need all of them. I open in designer mode in Property window "Items", choose right one and than select "Visibility " > false. In designer mode button dissapear. When compile, designer is reloaded, button is back again.
If I code manually in constructor of ChildForm:
myCustomControl .Items["someButton "].Visible = false;
it worsk OK.
What would you advice me, please?
Comment