03-25-2021 04:38 AM
Hi,
03-25-2021 04:47 AM
Hello Brian,
you can do this both in the interactive UI editor or programmatically. In the first case use the menu Create / Classic-Style Controls / Decoration and select one of the four frames offered. The color you choose with the Paint Tool of the UI Editor. Select it, then click with it on your frame and choose a color
03-25-2021 04:59 AM
And how can i combine it with another control?
For example we have a Picture ring, and when we set Frame visible with the frame color red we have the problem that the frame have a wrong dimension (see attached Picture)
03-25-2021 05:03 AM
For this you use the Edit tool. Alternatively, you can select the frame and click F10
03-25-2021 05:09 AM
Hi Wolfgang,
in the edit i can't change the size of my frame from the control.
How can i do this?
Bests
Brian
03-25-2021 05:20 AM
with the mouse, go to one of the corners, the mouse will change its shape from a cross to a diagonal double arrow
03-25-2021 06:17 AM
Are you aware that some controls already have their own fame that you can customize?
The picture control, for example, can display a frame that here I painted in red:
Now, for this to work some details must be set appropriately:
- Set "Conform to system colors" panel attribute to False
and
- Use Classic-style controls
or
- Use Lab-style controls but disable Use Windows Visual Style for Controls panel attribute
Just as an example, here are two picture rings on a panel with the last attribute disabled:
Here the same controls pasted on a panel with windows-style controls enabled:
As you can see the leftmost control maintains its red frame.
03-25-2021 09:59 AM
Here are my Edit Control... Resizing the Frame is impossible and the "Conform to system colors" isn't available.
Bests
Brian
03-25-2021 12:06 PM - edited 03-25-2021 12:06 PM
"Conform to system color" is a panel attribute, not a control attribute.
Having said this, looking at that image I can only guess that some of the images loaded in the ring are larger than the one shown; beside it, it seems to me that you have painted in red the control background and not the frame (or maybe both).
If ring images are different in size you must decide what to do with the control, since it cannot automagically adapt to the size of the element shown: an option could be to center the images in the control, which usually gives a good aspect with every element shown, but you may decide to follow other routes if they better suite your needs.
I am attaching an .UIR that holds both a Lab-style and a classic-style ring for you to check and examine (CVI2017).