Hi all,
We have some panels inside another panel. How can we make the smaller panels display with their own background colour. ?
Currently they all display with the background colour of the main panel.
If I write an Init script on the small panel instance to set the background colour (eg, main() { this.backCol = "Red";} this does not set the background colour. Instead it sets the background colour of other objects inside the panel (for example textfields).
The only way I've found to achieve this is to place a rectangle inside the whole panel and give it a background colour. This is not desireable because we don't want a rectangle inside the panel, and it makes selecting multiple objects inside the panel with click and drag difficult.
Regards,
Angus Heyworth
How to make panel within panel display with its own background colour?
- AngusETM
- Posts:37
- Joined: Tue Apr 25, 2017 4:48 pm
How to make panel within panel display with its own background colour?
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: How to make panel within panel display with its own background colour?
If you add a reference panel to a main panel (in GEDI or using addSymbol) only the objects defined in the reference are added.
The panel background itself is not part of the reference in this case.
There is no possibility beside the one you have mentioned with a rectangle in the reference.
Best Regards
Leopold Knipp
Senior Support Specialist
The panel background itself is not part of the reference in this case.
There is no possibility beside the one you have mentioned with a rectangle in the reference.
Best Regards
Leopold Knipp
Senior Support Specialist
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: How to make panel within panel display with its own background colour?
Angus Heyworth wrote:
I have tested this and do not see how the rectangle makes the selection difficult. But perhaps this could be overcome by setting the shape property 'TransparentForMouse'.The only way I've found to achieve this is to place a rectangle inside the whole panel and give it a background colour. This is not desireable because we don't want a rectangle inside the panel, and it makes selecting multiple objects inside the panel with click and drag difficult.
- schneebergera
- Posts:89
- Joined: Sun Apr 03, 2016 5:52 pm
Re: How to make panel within panel display with its own background colour?
Hello,
as already discussed, at the moment it isn't possible to add a background color to a panel via ctrl script.
Did you try to use addShape()?
This function has been implemented recently and it is therefore possible to assign a background color via a "rectangle" to a panel.
e.g.
addShape(myModuleName(), myPanelName(), 1, "RECTANGLE", "rect_backGround");
dyn_int size;
size = getPanelSize(myPanelName());
rect_backGround.backCol("red");
rect_backGround.size(size[1], size[2]);
rect_backGround.fill("[solid]");
best regards,
Andreas
as already discussed, at the moment it isn't possible to add a background color to a panel via ctrl script.
Did you try to use addShape()?
This function has been implemented recently and it is therefore possible to assign a background color via a "rectangle" to a panel.
e.g.
addShape(myModuleName(), myPanelName(), 1, "RECTANGLE", "rect_backGround");
dyn_int size;
size = getPanelSize(myPanelName());
rect_backGround.backCol("red");
rect_backGround.size(size[1], size[2]);
rect_backGround.fill("[solid]");
best regards,
Andreas
- RudiKreiner
- Posts:198
- Joined: Mon May 16, 2011 2:10 pm
Re: How to make panel within panel display with its own background colour?
I downloaded WinCC OA V3.16 last week and looked for the addShape in the Online Help function but nothing was found.
Is that an undocumented feature?
Is that an undocumented feature?
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: How to make panel within panel display with its own background colour?
According to the information in our internal database it should be documented.
I have asked our documentation group where the documentation can be found.
Best Regards
Leopold Knipp
Senior Support Specialist
I have asked our documentation group where the documentation can be found.
Best Regards
Leopold Knipp
Senior Support Specialist
- mnoehrer
- Posts:1
- Joined: Wed Jan 04, 2012 2:18 pm
Re: How to make panel within panel display with its own background colour?
Hello,
due to some technical problems these parts were missing within the release version. The problem has been fixed and will be released with P001.
I already forwarded you a pre-release version for these missing topic. I am sorry for the inconvenience.
With best regards,
Marcus
due to some technical problems these parts were missing within the release version. The problem has been fixed and will be released with P001.
I already forwarded you a pre-release version for these missing topic. I am sorry for the inconvenience.
With best regards,
Marcus