From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set label attributes for active cursors?

Hi all,

does anyone know how to set label attributes for active cursors?? I like to invert the label's text color and background color. Usually this can be done by using Properties "Label->TextColors", but I can't find a way to get the property node for an active cursor label.

Any ideas??
thx
0 Kudos
Message 1 of 6
(2,808 Views)
1.If you speak about cursors of graphs you can change their properties by creating graph property node. Then select Properties/Cursor/Cursor Name for example. There are many other properties of cursor such as Color, Style and so on.

2. If you mean the cursor of the mouse then you have to use WinAPI functions to chage its style. But I've seen free Mouse toolkit for LV somewhere in the internet or in DevZone.

Oleg Chutko.
0 Kudos
Message 2 of 6
(2,808 Views)
Dear Oleg,

I am talking about cursors of graphs (espacially xy-graphs). You are right, that one can change the properties selecting them via Properties/Cursor/Cursor Name.
For example you can create an active cursor by placing a xy-graph on a front panel and choosing "Visible Items->Cursor Legend" and now simply assign a name in the first text box of the active cursors legend palette. Check "Show Name" in the properties menu to show the active cursors name in the xy-graph.

Unfortunatly it seems only possible to set the cursor's attributes. In fact, I am looking for a possibility to change the active cursors label's attributes, but can't get the active cursor's label reference, to invert the label's text and background color??

Any Ideas ??
T
hx
0 Kudos
Message 3 of 6
(2,808 Views)
Hi MrX,

you can't do that directly.
An idea is to make a picture of your graph and display on it your text, in this way you can set many text properties.
I attach an example that shows how to do it.
If you want the text to follow the cursor position , then you have to had some 'annoying' programming to correlate the cursor position on your graph to the insertion point of the text on the picture.

Good job,

Alberto
0 Kudos
Message 4 of 6
(2,808 Views)
Chris,
Unfortunatelly, we do not have active cursors label's attributes. You can, manually or programatically, set the name and color of the cursors. By changing the color of the cursor, you automatically change color of its name/label. Please find the attached VI that does this.

Zvezdana S.
National Instruments
0 Kudos
Message 5 of 6
(2,808 Views)
Dear Zvezdana S.,

thanks all for helping. I now simulate an inverted label by generating a signal behind the active cursor's label.
It also would be possible to move a string indicator on the front panel.

I simply was searching for an easier way of doing that, because I have to use active cursors anyway to generate a specified diagram, thus it would be nice to use active cursors to mark an event on a diagram.

chris
0 Kudos
Message 6 of 6
(2,808 Views)