Page 1 of 1

Modify Reusable Part Properties at Design Time

Posted: Fri Jun 30, 2017 6:01 am
by jyoung
Is it possible to have properties of a reusable part (VLWEB) show and be editable in the Details Properties window?

For example, here is a part that exposes a "MarginLeft" to set the margin left of its own controls.

Code: Select all

* ================================================================================
* PROPERTIES
* ================================================================================
define_pty name(MarginLeft)  get(GetMarginLeft) set(SetMarginLeft) access(*PUBLIC) category(Other)

ptyroutine name(SetMarginLeft)
define_map for(*INPUT) class(#STD_INT) name(#margin)
#OFOFID.MarginLeft := #margin
#OFOFIN.MarginLeft := #margin
endroutine

ptyroutine name(GetMarginLeft)
define_map for(*OUTPUT) class(#STD_INT) name(#margin)
* just set it to something right now
#margin := 100
endroutine

When this component is dragged onto the design surface
Capture.PNG
Capture.PNG (9.26 KiB) Viewed 4031 times
You can see the MarginLeft values out of place with the field in the component (OFOFID [Office Number] and OFOFIN [Office Name]).

This works really well and I can programmaticaly set the properties and everything works fine.

Code: Select all

#OfficeNumberLookupPanel.MarginLeft := 100
However, the properties don't show up in the Properties tab of the Details window.
Capture2.PNG
Capture2.PNG (11.05 KiB) Viewed 4031 times
Which means I cannot set them at design time and the design view is all weird even though the runtime view is fine.

Is there any way to make properties of a reusable part show up in the Properties Tab?

Re: Modify Reusable Part Properties at Design Time

Posted: Fri Jun 30, 2017 9:01 am
by dannyoorburg
Hi,

no sorry, there isn't.

Even if there was, it'd probably be restricted to the simple properties, the ones that don't require property routines, as I'm not sure it would be advisable or even possible to execute RDMLX at design time.

Regards,
Danny