Inhertited forms, tooltips, menustrips, and the IDE

E

Ethan Strauss

Hi,
Is it possible to access menustrips and tooltips from the IDE when they
are present on a form from which you have inherited? I would like to have a
template form from which a bunch of forms inherit. This template would have a
tooltip provider & a menustrip, but I need to be able to access both of those
in the child forms to add remove items. I can manipulate the programatically
by creating getters & setters, but I would prefer to access them through the
Designer. Is this possible?
Thanks,
Ethan
 
D

DaveL

you should be able to , set the access modifiers
or add property to your base window to access
these controls

DaveL
 
E

Ethan Strauss

That's what I thought, but it does not seem to work.

Here is the code in the base Form
public MenuStrip SettingsMenuStrip
{
get
{
return settingsMenuStrip;
}
set
{
settingsMenuStrip = value;
}
}
public ToolTip SettingsToolTip
{
get
{
return DNANormalizationToolTips;
}
set
{
DNANormalizationToolTips = value;
}
}


but when I try to access properties of the MenuStrip in an inherited form,
everything is grayed out and I have no tooltip property for other controls.
I can get to both in the code....
Any ideas?
Thanks,
Ethan
 
D

DaveL

when you try to access the menusttrip from the ide from a inherited form ,
it will be readonly

in my customer mdi form i have a grpbox with several buttons on it to set
colors for different items and location of items on the midi form... (base
class)
when i start a new app and inherit this base class
i can not change the grpbox with controls on it....
but what i have done is set up events so the inherited app
can save change , etc

Example on the Grpbox there is a savebutton btnsave modifier is protected
the inherited app can set
btnSave.Click+= new System.EvenHandler(SaveSettings) ;

in the inherited forms code
private void SaveSettings(object sender, EventArgs e)
{
// now the inherited app can make changes to the items in the base
class
//where ive set properties or controls to protected
}

in you case i would think, not sure, since this is a Standard menu or Tool
strips
you mite want to consider new menu and new tool strips when new app with
there own menu
and tool strips

and in your base have tools to work upon these items

im still not clear what you are doing....

Hope the above helps a bit
DaveL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top