LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Framing an control

Hi, 

I want to put a frame around some controls and change the color of it.
 
 
How can i do this?
Bests
Brian
0 Kudos
Message 1 of 9
(1,945 Views)

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

0 Kudos
Message 2 of 9
(1,937 Views)

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)

Download All
0 Kudos
Message 3 of 9
(1,925 Views)

For this you use the Edit tool. Alternatively, you can select the frame and click F10

0 Kudos
Message 4 of 9
(1,918 Views)

Hi Wolfgang,

in the edit i can't change the size of my frame from the control.

How can i do this?

 

Bests

Brian

0 Kudos
Message 5 of 9
(1,907 Views)

with the mouse, go to one of the corners, the mouse will change its shape from a cross to a diagonal double arrow

0 Kudos
Message 6 of 9
(1,905 Views)

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:

Picture ring.png

 

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:

Screenshot 2021-03-25 12.11.52.png

 

Here the same controls pasted on a panel with windows-style controls enabled:

Screenshot 2021-03-25 12.13.08.png

 

As you can see the leftmost control maintains its red frame.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 9
(1,891 Views)

Here are my Edit Control... Resizing the Frame is impossible and the "Conform to system colors" isn't available.

Bests 

Brian

edit control.png

0 Kudos
Message 8 of 9
(1,871 Views)

"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).



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 9 of 9
(1,859 Views)