[Gambas-user] Custom controls

nospam.nospam.nospam at ...626... nospam.nospam.nospam at ...626...
Sun Jan 17 07:59:48 CET 2010


2010/1/17 Aaron Peachey <alpeachey at ...626...>:
> Hi all,
> I'm just learning Gambas and trying to do something simple (I thought)
> by making custom versions of controls.
>
> For example, I want to inherit the Label and TextBox controls to add
> some new properties and methods.
> As a basic example, in my program the labels for mandatory fields are a
> different font/colour to the non-mandatory field labels. To achieve this
> (in wxPython) I have simply inherited the Label control and added a new
> variable 'isMandatory' to pass to the constructor which is then used to
> determine the font/colour of the label.
>
> I've searched everywhere trying to find out how to do this and come up
> with very little on how to do this. Can anyone point me in the right
> direction please?
>
> Also, once I have created custom controls (one step at a time, i
> know...), can I get them into the Gambas GUI toolbox so I can drag them
> onto forms etc. or do I need to add them to their parents programatically?

http://gambasdoc.org/help/dev/gambas




More information about the User mailing list