[Gambas-user] Custom controls

Aaron Peachey alpeachey at ...626...
Mon Jan 18 03:08:27 CET 2010


>
>
>
> For example, you have to:
>
> 1) Create a class named "MyLabel" in your project.
> 2) Use "INHERITS Label".
>
> But you have to use it manually, and you won't see it in the IDE toolbox.
>
> If you want that, you have to create a component, as explained in the link
> provide by nospam x 3.
>
> Regards,
>
> --
> Beno?t Minisini
>
> Thanks. I was able to do all this but it raised a few questions:
1. How do I add an instance of my custom control to a form? I tried to just
instantiate a NEW instance of it passing the formname as the parent
parameter but it didn't appear on the form. So then I used the Show method
and set the X and Y properties but still couldn't get it to show up.
2. How do I define custom parameters for the _new method? I've managed to
define the method using my own parameter but not sure what order to pass
them in when I instantiate (i.e. do I pass the parent parameters then the
custom ones or vice versa)?

thanks again
Aaron



More information about the User mailing list