[Gambas-user] (Custom) virtual controls

Benoît Minisini gambas at ...1...
Sun Oct 12 01:45:26 CEST 2014


Le 12/10/2014 00:52, B Bruen a écrit :
> A couple of oddities have emerged from my work in the "A Good Idea?"
> thread:
>
> 1) the _IsVirtual constant - this appears now to be a function? Is
> the help documentation correct or is this constant/function something
> I am not understanding?

_IsVirtual is a constant boolean. Where do you see it is a function?

>
> 2) a bit more complex - I have an ancestral class, VMenuItem, that
> exposes some properties. In the popup wrapper class that inherits
> VMenuItem I set the values of these properties in the constructor.
> When I drag the popup virtual control onto a form in the IDE these
> properties show on the control properties panel, but the values are
> not shown.  Any clues?
>
> regards Bruce
>

Putting a custom control on a from in the IDE has nothing to do with 
instanciating it at runtime.

In other words, you must tell the default values of your properties 
(i.e. the value they have once your control is instanciated) in the 
_Properties constant, otherwise you won't see them. No magic there!

This is normally explained in the wiki.

Regards,

-- 
Benoît Minisini




More information about the User mailing list