|
-
Nov 6th, 2009, 05:16 AM
#1
Thread Starter
Fanatic Member
Inherited Form Problem
I have a base form with a toolstrip container and one toolstrip on it with five buttons.
When I inherit from this form I can't see the toolstrip container, the toolstrip or the buttons. They appear during runtime, just not visible during design time (although they're visible in the document outline. The problem is that I can't add any toolstrips or buttons to the existing toolstrip on my inherited form.
Does anyone know why this is happening and how I can fix it? It's making me wonder what the point of inherited forms are if you get problems like this...
[EDIT] When I select the controls in the document outline window, the properties are grayed out and uneditable. I tried changing the modifiers of these controls on the base form from 'protected' to 'public' (and rebuilt the project) but still no joy.
Last edited by simonm; Nov 6th, 2009 at 05:24 AM.
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
-
Nov 6th, 2009, 05:38 AM
#2
Re: Inherited Form Problem
The reason that they are invisible is probably because they are on a ToolStripPanel (the top panel of the container) which is hidden (collapsed).
That said, you cannot edit any controls that are on the inherited base form anyway. You can only edit them in the base form, and those changes will then show up in all derived forms. That is just how inherited forms work.
I do find that, in the case of Menu/Toolstrips, this is not optimal behavior. I would like it if you could still have the option of adding items to them. I am often in a situation where I need many forms with the same layout, but other toolstrip items. I do however have an Infragistics toolset which has a new toolstrip control which I'm pretty sure is editable in inherited forms. I'm not sure how they did that, lol.
-
Nov 6th, 2009, 05:42 AM
#3
Thread Starter
Fanatic Member
Re: Inherited Form Problem
What is the point of having a container in the base form if you can't add items to it in the inherited form?
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
-
Nov 6th, 2009, 05:46 AM
#4
Re: Inherited Form Problem
You need to add the items in the base form, so they must be the same in all inherited forms. At least, I have always thought that. Someone else may come along and tell us that that is not the case at all, but I'm pretty sure that I'm right 
I don't think it's very good either, but we've gotta live with it.
Anyway, if it's just the one ToolStrip why not simply add it manually to all inherited forms? That would take half a second for each form.
-
Nov 6th, 2009, 05:49 AM
#5
Thread Starter
Fanatic Member
Re: Inherited Form Problem
I've got a toolstrip with five buttons on it, all code behind them is the same so implemented on the base form. I just need to add some additional buttons (sometimes) on an inherited form. Having to duplicate that on every form completely undermines the point of inheritance. You're supposed to be able to indicate (with the 'Modifiers' property) whether a control should be modifiable in the inherited form.
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
-
Dec 8th, 2010, 03:43 PM
#6
New Member
Re: Inherited Form Problem
Last edited by mcaizcm3; Oct 3rd, 2011 at 07:14 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|