PB 2019 R3
I don't know if this is possible but I am trying to get the width and height of a UserObject as it was designed (in the PBL). When creating a window we insert multipe UserObjects as TabPages and I need them all to size to the tab. When the UserObject constructs I only have what the current size is for the tabpage. If I can get the original size I can adjust all the objects within so they all look like they were designed for this window.
Thanks,
Chris Craft
// Only use the ancestor if we have a parent class - this supports OpenTab()
IF NOT IsNull(lClassDef.ParentClass) THEN
IF IsValid(lClassDef.Ancestor) THEN
lClassDef = lClassDef.Ancestor
END IF
END IF
...Rest of code
Thank you for that insight into your solution! Very interesting.
FWIW: In my STD Framework, it's designed to send a "Resize" Event to ALL nested objects. For example: TC => each TP => each UO ... then if nested furher => each TP => each UO .. etc - down the *entire* Parent / Child chain. That way, each object is encapsulated resize wise and the resize logic is very simplex..Plus, you can nest objects indefinitely without worrying about nested object resizes from high level parents they are all independent of the "immediate" parent that controls them. Food for thought (in the big long term picture). I always wondered why PB or the PFC for that matter never implements this. ;-)
Regards ... Chris