A mechanism of Windows Forms that lets forms inherit controls and appearance.
Questions tagged [visual-inheritance]
43 questions
2
votes
1 answer
C# visually subclass datagridview control VS2005
Maybe its something stupid, but I'm having a problem with a subclass of a DataGridView Control in VS2005 C#. I know I can subclass from almost anything by doing
public class MyDataGridView : DataGridView
{}
no problem, and I put in some things /…

DRapp
- 47,638
- 12
- 72
- 142
2
votes
2 answers
Visual inheritance of DB components or New component?
I have 3 different DataModules: ADOModule, SDACModule, AstaModule. All are identical, except DB components they use: ADO, SDAC, Asta.
All these DataModules do the same job, but through the different components. What I mean - is that all inner…

notricky
- 179
- 1
- 2
- 18
1
vote
0 answers
Visual inheritance problem
I've build a base user control, BaseViewControl, it has a dataGridView and a bindingSource on it. Both have protected access modifiers. The dataViewGrids dataSource points to the base forms bindingSource.
Then I created an InheritedUserControl,…

HarveySaayman
- 351
- 3
- 12
1
vote
3 answers
Can i know in the parent Form if an inherited Form has subscribed to the Show event?
I have the following forms in my winforms framework
FormBase (inherited from Form)
FormBaseList (inherited from FormBase)
FormBaseDetail (inherited from FormBase)
Now every form in the application inherits from on one of the 3 above.
For example…

GuidoG
- 11,359
- 6
- 44
- 79
1
vote
1 answer
How can I get visual inheritance working at high dpi values?
I have the following example form TForm1 with two buttons (BitBtn):
Additionally I have a second form TForm2 which is derived from the first form.
The second button is moved to the left and another button is added:
At runtime (Windows 7), the…

ventiseis
- 3,029
- 11
- 32
- 49
1
vote
2 answers
Does Visual Inheritance work with User controls in VS2008
I have a base User Control. I place Ok and Cancel buttons on the bottom right of the control and anchor them Bottom and Right.
I then create another user control that inherits from the base user control. I resize the inherited control (e.g. increase…

AngryHacker
- 59,598
- 102
- 325
- 594
1
vote
3 answers
Does Visual Inheritance work in VS2008?
I have a base form. I place Ok and Cancel buttons on the bottom right of the form and anchor them Bottom and Right.
The inherited form does not honor the anchor properties of the Ok and Cancel buttons. Here are the exact steps to repro.
1- Create…

AngryHacker
- 59,598
- 102
- 325
- 594
1
vote
3 answers
What is the standard approach for event handling in case of Visual Inheritance?
We know that when a Form is visually inherited, all of its controls are locked in design time. This problem requires that we place event handlers in the base form. Now what should I do if I want to place base-control event handlers in the derived…

user366312
- 16,949
- 65
- 235
- 452
1
vote
1 answer
How to achieve visual inheritance in C# and VS2010
I'm using VS2010 and WinForms, and needs lots of forms for creating/updating data entities. How can I go about creating a base form from which to inherit (Cancel and OK buttons, entity parameters, etc)?

Jay
- 10,200
- 4
- 28
- 36
1
vote
1 answer
Activity layout inheritance
I start develop application on Android!
I need to show common control on the top of few screens.
In Blackberry I just inherit my screens from base screen with needed controls and it inherit UI and behaviour from base type.
How can i do similar thing…

Vlad Tsepelev
- 2,056
- 1
- 21
- 32
1
vote
3 answers
Visual inheritance in Java
The team in which I work has been getting problems with the visual inheritance of the forms in the Java platform.
We want to develop a base JFrame with some controls in it and to have inherited forms from that base JFrame. The designer of the…

Javier Suero Santos
- 544
- 7
- 21
1
vote
1 answer
VB.NET Visual Inheritance: Friend VS Protected
Why is it that some components/controls will not be inherited visually in a child form if they are declared with the access modifier Friend vs when they are declared with Protected.
For example, I've got a DataSet object in my Parent Form that was…

Overhed
- 1,289
- 1
- 13
- 41
1
vote
1 answer
Visual Studio crashes while setting the modifier of base UserControl to protected
I have a user control class BaseUserControl and a class DerivedUserControl which is derived from BaseUserControl. Both are shown correctly in the Visual Studio Designer, also after rebuilding the solution.
In the BaseUserControl I have a protected…

user3570134
- 109
- 8
1
vote
1 answer
How to hide inherited control mark in design mode
In screenshot you can see two forms:
Control in Design Mode which have inherited controls. This control's marked by a special symbol.
Print preview form which also contains this symbol.
Question:
How to remove (or make invisible) this symbol on…

Evgeny Bychkov
- 322
- 1
- 2
- 11
0
votes
1 answer
How do I 'revert to inherited' if control is not clickable?
Assume the following situation:
FrmBase has a TPanel named PnlClient, align alClient
FrmDescendant inherits from FrmBase
In FrmDescendant I change a PnlClient property
In FrmDescendant I place another control (say another TPanel named…

Jan Doggen
- 8,799
- 13
- 70
- 144