Redefine / delete child controls

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Redefine / delete child controls

woprandi
Hi,

Is it possible, in a class, to redefine or delete child controls of a super class. I have a class inherited from qx.ui.form.DateField and I would like to delete "textfield" child control and replace it by 3 others (for day, month and year).
I tried _releaseChildControl("textfield") without success.
Anyone could help me ?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Redefine / delete child controls

MartinWittemann
Administrator
Hey,
> Is it possible, in a class, to redefine or delete child controls of a super
> class. I have a class inherited from qx.ui.form.DateField and I would like
> to delete "textfield" child control and replace it by 3 others (for day,
> month and year).
> I tried _releaseChildControl("textfield") without success.
> Anyone could help me ?

You can override the ‚_createChildControlImpl‘ [1] method and simply return you custom widget as soon as the id is ‚textfield'. But you should check if the widget which you want to return supports the needed API. Some other parts of the DateField might get the child control and rely on the Textfield API (like setValue).

Regards,
Martin

[1] http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.Widget~_createChildControlImpl!method_protected
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel