I want to be able to bind the text from the parent and not from the child module. I there a way to have some thing like below in the parent using my module widget ?
Quite doable. Do note that function / property bindings execute every frame, non stop, so it’s not too efficient. Probably irrelevant unless it’s hundreds of widgets, though. Ask yourself if you must update the value 120 times per second… If not, do look into driving updates with events instead.
If you must do it this way:
• create a variable of parent type in the child
• on parent’s Construct, set the child’s variable’s value to Self, thus creating a hard reference
• the child can now access parent’s variables via property bindinn
Indeed for what I need in this case, it is not really efficient and I will change the way to do it. But I still want to try it, in case I do need it later.
But then, as above, if you’re reusing user widgets you’d need give them identifiers so they know which piece data to pull. May get fussy and convoluted; It’s not the best method to start with.
Give it a try, it may work OK for something relatively simple.