Skip to content

Commit

Permalink
make parentComponent gettter/setter
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Jan 23, 2024
1 parent cac69ee commit 1a3850e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion haxe/ui/backend/ComponentBase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,18 @@ class ComponentBase extends ComponentSurface implements IClonable<ComponentBase>
Returns `null` if this component hasn't been added yet, or just doesn't have a parent.
**/
private var _parentComponent:Component = null;
@:dox(group = "Display tree related properties and methods")
public var parentComponent:Component = null;
public var parentComponent(get, set):Component;
@:noCompletion
private function get_parentComponent():Component {
return _parentComponent;
}
@:noCompletion
private function set_parentComponent(value:Component):Component {
_parentComponent = value;
return value;
}


public function containsChildComponent(child:Component, recursive:Bool = false):Bool {
Expand Down

0 comments on commit 1a3850e

Please sign in to comment.