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
Setting panel properties through reference panel
Search
-
- Posts: 4
- Joined: Thu May 17, 2018 10:28 am
Re: Setting panel properties through reference panel
Yes, can be done but it's really not obvious.
Inside the "ref-def" panel use code like this:
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
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");
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
-
- Posts: 4
- Joined: Thu May 17, 2018 10:28 am
Re: Setting panel properties through reference panel
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
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
-
- Posts: 4
- Joined: Thu May 17, 2018 10:28 am
Re: Setting panel properties through reference panel
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
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
-
- Posts: 634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Setting panel properties through reference panel
Currently this is not possible. It is currently being analyzed.