LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Customize numeric gauge markers

I am trying to change the number of markers shown for a numeric gauge. The markers are overlapping each other in places, and reducing the number of markers (or increasing their step size) would fix the problem.

I would prefer not to reduce the font size, as the gauge then looks out of place against the rest of the panel.

I have searched the properties, help, include files, forums and web, to no avail. I can change the start and end angle of the markers, but not the number of markers in between. Also, I can control the scales on a graph control, but not on a numeric gauge.

Any clues would be most appreciated.
0 Kudos
Message 1 of 4
(3,459 Views)
There are limited options. One I have used is to Edit Numeric, and hide parts. You can hide any part of the control, Double click the control to get to the dialog, then Show/Hide Parts. Set No Markers & No Ticks. Put your own scale in using text messages. If you want this to be a dynamically changeing scale, then you can use the user interface get and set properties functions to move the text messages around. I know this is spartan at best. See the attachment (written using CVI 5.5) Oh, and since this message board does not support .uir as a valid file attachment extension (go figure) you will manually have to rename it to that before reading the file. It is attached as untitled.txt
0 Kudos
Message 2 of 4
(3,438 Views)
Hello Navillus,

The easiest way would be to modify your fonts so they do not overlap, but since this is not possible, as Ryykker mentioned, you could hide all the tick marks on your control and then label appropriate locations with text labels. Also, if you have the CWKNOB ActiveX control installed on your machine, you could use this control, and then manually set the number of major divisions. On the other hand, with the CW controls, you have to use the use the ActiveX interface instead of the native CVI Get/Set attribute functions.

Thanks.
0 Kudos
Message 3 of 4
(3,417 Views)
You could also use two overlapped controls.

Place a ring gauge on the panel and customize the label/value pairs to satisfy your needs. Color the needle transparent to make it invisible.
Create a numeric gauge without tick marks and markers, color in transparent the backround and frame and make its dimensions the same as the ring gauge, then place it on top of the ring.

You can look at the attached sample UIR.

Hope this helps
Roberto


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?
Message 4 of 4
(3,409 Views)