[Gambas-user] (Custom) virtual controls
B Bruen
bbruen at ...2308...
Sun Oct 12 06:06:25 CEST 2014
On Sun, 12 Oct 2014 01:45:26 +0200
Benoît Minisini <gambas at ...1...> wrote:
> 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?
In the Form_Open() for the application form Print VSysInfos._IsVirtual
outputs
(Function vSysInfos:12)
For what it's worth line 12 of the vSysInfos class is a comment
' Public Const _Properties As String = "*"
QT4?
>
> >
> > 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
>
Ah, rats. I see now why this doesn't work. Dammit.
I don't suppose I could use a Subst() in the constant declaration could I. (Just joking.)
regards
Bruce
--
B Bruen <bbruen at ...2308...>
More information about the User
mailing list