Inheritance is easier than you'd think.
Here's a simple example...
Consider this class file, I'll call it TextBoxT.class ...
' Gambas class file
Inherits TextBox
Property Tag2 As Variant Use $vTag2
'
now you have a TextBoxT that does everything a TextBox does but also has an extra Tag property TextBoxT.Tag2You can add Public functions and other properties to the class all accessible using TextBoxT like any textbox.
PS.
To see the Tag2 property (or any others you make) in the IDE form designer you'd need to add them to the _Properties const..
Public Const _Properties As String = "*,Tag2"
(using * states all textbox properties)
this way if you want it in the form designer ...
' Gambas class file
Export ' need this to be visible in the form designer
Inherits TextBox
Public Const _Properties As String = "*,Tag2" ' only do this if you need the properties in the form designer
Public Const _DrawWith As String = "TextBox" ' the form designer render it like a textbox
Public Const _Similar As String = "TextBox" ' with this in the form designer you can change a textbox into a textboxt with right click
Property Tag2 As Variant Use $vTag2
'