[Gambas-user] Edit specialised Forms in the IDE
Benoît Minisini
gambas at ...1...
Tue Nov 12 14:28:21 CET 2013
Le 12/11/2013 14:22, Tobias Boege a écrit :
> Hi,
>
> I have written a StatusbarForm.class which is a Form with a built-in
> Statusbar. Some people seem to like this sort of thing.
>
> My class hierarchy looks like this:
>
> - Statusbar.class (a Statusbar)
> - _StatusbarLabel.class (to manage the contents of a Statusbar)
> - Form
> -> StatusbarForm.class (Inherits Form and builds a Statusbar)
> -> FMain.class (Inherits StatusbarForm)
>
> FMain is an example of a StatusbarForm to run the project.
>
> First question: Is this a good way to specialise the Form class?
> Second question: How do I now edit FMain in the IDE Form editor?
>
> I believe this is possible, as the Report class can do it - I only can't
> find the right charm.
>
> Regards,
> Tobi
>
You should make a StatusBar control instead, that behaves "the good way"
when put inside a Form (or any other container).
Imagine that someone else add a feature to the Form class the same way:
you won't be able to use the two features at the same time. So
inheritance is not the good method for adding new features to the Form
class.
Regards,
--
Benoît Minisini
More information about the User
mailing list