- // Allow parentless widgets
- if (parent != null) {
- // Do not add TStatusBars, they are drawn by TApplication.
- if (this instanceof TStatusBar) {
- // We don't add the child to the children list here
- this.parent = parent;
- this.window = parent.window;
- } else {
- parent.addChild(this);
- }
- }
-