Setting panel properties through reference panel

Find and share HowTos to various installations / configurations!
Search

Post Reply
5 posts • Page 1 of 1
laurensnoorland
Posts: 4
Joined: Thu May 17, 2018 10:28 am

Setting panel properties through reference panel

Post by laurensnoorland »

Hi All,

I created a panel with panel properties (set and get).
Now i want to drag and drop this panel and start a reference panel to configure these properties.

Is this possible?

For example the clock widget can set properties through a 'wizard' panel.

Thanks in advance

Laurens

User avatar
mkoller
Posts: 741
Joined: Fri Sep 17, 2010 9:03 am

Re: Setting panel properties through reference panel

Post by mkoller »

Yes, can be done but it's really not obvious.
Inside the "ref-def" panel use code like this:

Code: Select all

  dyn_anytype shapes = getConstructRefShapes();
  shape s = shapes[1];
  shape p = s.panel;

  invokeMethod(p.moduleName + "." + p.name + ":" + s.refName, "setColor", "red");
Explanation:
The reference added is asked for the shapes it contains. From the first shape pointer,
I get the pointer to the panel on which the ref is placed, and from this I get
the (gedi) module name and the panel name so I can build an "address" string for
the ref

laurensnoorland
Posts: 4
Joined: Thu May 17, 2018 10:28 am

Re: Setting panel properties through reference panel

Post by laurensnoorland »

Hi Martin,

It works! Thank you for the explanation.

Without a form of IntelliSense, that shows what is behind the pointers, you will not come to this solution.

Best regards,
Laurens

laurensnoorland
Posts: 4
Joined: Thu May 17, 2018 10:28 am

Re: Setting panel properties through reference panel

Post by laurensnoorland »

Hi Martin,

My reaction that it works was too fast.

With the offered solution it is possible to address the get and set functions for a property. The change of the property (done by the set function) is immediately visible in the GEDI.

But the property is not really set. The corresponding input field in the 'Property Editor' under the Extended tab remains empty. The property is not saved after saving the panel.

My wish is to set the properties as done with dollar parameters. After calling setDollarParams() the '$ -Parameter' is entered directly in the 'Property Editor'. After saving, the dollar is saved in the panel.

Is this possible?

Thanks in advance

Laurens

Gertjan van Schijndel
Posts: 634
Joined: Mon Aug 02, 2010 10:37 am

Re: Setting panel properties through reference panel

Post by Gertjan van Schijndel »

Currently this is not possible. It is currently being analyzed.

Post Reply
5 posts • Page 1 of 1