T
T
tolanych2017-09-07 19:04:03
C++ / C#
tolanych, 2017-09-07 19:04:03

Is it possible to implement controls on a form by analogy with classes and interfaces?

Is there any pattern for implementing a form blank (skeleton)? As a class inheriting from an interface.
Example:
I want to have a form template and define 3 controls on it: Surname, Name, Age.
Then, from this form, create several inherited forms and in these inherited forms, in addition to these 3 standard controls, have their own specific ones.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Eremin, 2017-09-07
@EreminD

class MyBaseForm : Form {
   // и тут ваш перечень контроллов и их свойства
}

class MyChildForm1 : MyBaseForm {
   // наследник 1
}

class MyChildForm2 : MyBaseForm {
   // наследник 2
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question