开发者

How can I create a Sys.UI.Control from inside another Sys.UI.Control?

开发者 https://www.devze.com 2023-01-05 14:58 出处:网络
I\'m creating a somewhat complex clientside UI control, and the idea is that this control in itself contains other controls based on properties applied to it.

I'm creating a somewhat complex clientside UI control, and the idea is that this control in itself contains other controls based on properties applied to it.

I want to create these child controls from inside the initialize() overridden member, since I hav开发者_如何学Ce to produce the child DOM elements to which these child controls will be attached, but the documentation for $create() states that you shouldn't create components from inside the initialize() function.

Now, my question is, what do I do? What's the best strategy to use here?


We decided that only the complex clientside UI control should inherit from Sys.UI.Control, and that all objects inside it, along with the HTML they generate, should not, and thus should not be created using $create().

Although not a real answer to the question, this is a possibly solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消