[Gambas-user] GB3 Custom controls
Bruce Bruen
bbruen at ...2308...
Mon Nov 7 23:48:11 CET 2011
On Mon, 2011-11-07 at 21:26 +0100, Benoît Minisini wrote:
> > 4) It would be really, really nice if IsContainer was a RO property
> > exposed by all controls
>
> To know if a control is a container, use the "IS" operator:
>
> If MyControl Is Container Then ...
>
> The difference is when a control actually inherits UserControl. It is
> a
> container, but it must be used as a control.
>
> So the test you need is:
>
> If MyControl Is Container And If Not MyControl Is UserControl
> Then ...
Ah! Thank you that. Don't know why I didn't think of it.
B
More information about the User
mailing list