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: 

Change the colour of lines in the same string indicator.

Hi everybody,

I'm getting crazy, because I'm looking for the way to change the colour of
the lines I want in the same string indicator.
I'm doing an application to control an instrument by serial port, and I'm
concatenating the lines that this instrument gives me, but there is some
line that I would want to change its colour, because there has been an alarm,
for instance. And I only can change all the string.
Is there any way to do this? I don't know.

Could you please help me?
0 Kudos
Message 1 of 8
(2,841 Views)
Hi Carlos

Try using a 'Multiple Selection List Box' indicator instead of a string indicator. You can highlight a line by adding the line
number to an array and pass it to the indicator node.

Tim

Carlos Jorge Granadino wrote:

> Hi everybody,
>
> I'm getting crazy, because I'm looking for the way to change the colour of
> the lines I want in the same string indicator.
> I'm doing an application to control an instrument by serial port, and I'm
> concatenating the lines that this instrument gives me, but there is some
> line that I would want to change its colour, because there has been an alarm,
> for instance. And I only can change all the string.
> Is there any way to do this? I don't know.
>
> Could you please help me?
0 Kudos
Message 2 of 8
(2,841 Views)
Hi Carlos

Try using a 'Multiple Selection List Box' indicator instead of a string indicator. You can highlight a line by adding the line
number to an array and pass it to the indicator node.

Tim

Carlos Jorge Granadino wrote:

> Hi everybody,
>
> I'm getting crazy, because I'm looking for the way to change the colour of
> the lines I want in the same string indicator.
> I'm doing an application to control an instrument by serial port, and I'm
> concatenating the lines that this instrument gives me, but there is some
> line that I would want to change its colour, because there has been an alarm,
> for instance. And I only can change all the string.
> Is there any way to do this? I don't know.
>
> Could you please help me?
0 Kudos
Message 3 of 8
(2,841 Views)
Thank you for your help, but I don't understand what you have told me. What
I have to pass to the indicator node, and what is this indicator node? My
problem now is the last thing I have to do.

Could you please explain my doubt with more detail?

Thank you a lot.
Timothy John Streeter wrote:
>Hi Carlos>>Try using a 'Multiple Selection List Box' indicator instead of
a string indicator. You
>can highlight a line by adding the line>number to an array and pass it to
the indicator node.>>Tim>>Carlos Jorge Granadino wrote:>>> Hi everybody,>>>>
I'm getting crazy, because I'm looking for the way to change the colour of>>
the lines I want in the same string indicator.>> I'm doing an application
to control an instrument by serial p
ort, and I'm>> concatenating the lines
that this instrument gives me, but there is some>> line that I would want
to change its colour, because there has been an alarm,>> for instance. And
I only can change all the string.>> Is there any way to do this? I don't
know.>>>> Could you please help me?>
0 Kudos
Message 4 of 8
(2,841 Views)
Hi Carlos

I'm sorry for being too brief with the last email.

1) Place an 'Multiple Selection Listbox' on your front panel.

2) Create an attribute node. Make the attribute 'Item Names'.

3) Put every completed line into the last element of an array, and then pass the array to the attibute node. (This build the list
of strings in the Listbox).

4) To highlight a line, make an array containing the line numbers (I32) that you want highlighted and pass it the terminal of the
Listbox.

Hope this is more helpful

Tim

Carlos Jorge wrote:

> Thank you for your help, but I don't understand what you have told me. What
> I have to pass to the indicator node, and what is this indicator node? My
> problem now is the last thing I have to do.
>
> Could
you please explain my doubt with more detail?
>
> Thank you a lot.
> Timothy John Streeter wrote:
> >Hi Carlos>>Try using a 'Multiple Selection List Box' indicator instead of
> a string indicator. You
> >can highlight a line by adding the line>number to an array and pass it to
> the indicator node.>>Tim>>Carlos Jorge Granadino wrote:>>> Hi everybody,>>>>
> I'm getting crazy, because I'm looking for the way to change the colour of>>
> the lines I want in the same string indicator.>> I'm doing an application
> to control an instrument by serial port, and I'm>> concatenating the lines
> that this instrument gives me, but there is some>> line that I would want
> to change its colour, because there has been an alarm,>> for instance. And
> I only can change all the string.>> Is there any way to do this? I don't
> know.>>>> Could you please help me?>
0 Kudos
Message 5 of 8
(2,841 Views)
Thank You Very Much.

The fourth step is a little bit difficult to understand, but what I've done
is all the three first steps, and in the fourth one I've made an array (I32)
of the lines that I don't want to highlight and connect it to Disabled �tems.

Do you think this is a good solution?

Thank you again for your help. I really needed someone to help me, because
if not I would still be with the STRING INDICATOR.

Timothy John Streeter wrote:
>Hi Carlos>>I'm sorry for being too brief with the last email.>>1) Place
an 'Multiple Selection Listbox' on your front panel.>>2) Create an attribute
node. Make the attribute 'Item Names'.>>3) Put every completed line into
the last element of an array, and then pass the array
>to the attibute node. (This build the list>of strings in the Listbox).>>4)
To highlight a line, make an array containing the line numbers (I32) that
you want
>highlighted and pass it the terminal of the>Listbox.>>Hope this is more
helpful>>Tim>>Carlos Jorge wrote:>>> Thank you for your help, but I don't
understand what you have told me. What>> I have to pass to the indicator
node, and what is this indicator node? My>> problem now is the last thing
I have to do.>>>> Could you please explain my doubt with more detail?>>>>
Thank you a lot.>> Timothy John Streeter wrote:>>
>Hi Carlos>>Try using a 'Multiple Selection List Box' indicator instead of>>
a string indicator. You>> >can highlight a line by adding the line>number
to an array and pass it to>> the indicator node.>>Tim>>Carlos Jorge Granadino
wrote:>>> Hi everybody,>>>>>> I'm getting crazy, because I'm looking for
the way to change the colour of>>>> the lines I want in the same string indicator.>>
I'm doing an application>> to control an instrument by serial port, and I'm>>
concatenating the lines>> that this instrument gives me, but there is some>>
line that I would want>> to change its colour, because there has been an
alarm,>> for instance. And>> I only can change all the string.>> Is there
any way to do this? I don't>> know.>>>> Could you please help me?>>
0 Kudos
Message 6 of 8
(2,841 Views)
Carlos Jorge Granadino wrote in message
news:38f9b018@newsgroups.ni.com...
>
> Hi everybody,
>
> I'm getting crazy, because I'm looking for the way to change the colour of
> the lines I want in the same string indicator.
> I'm doing an application to control an instrument by serial port, and I'm
> concatenating the lines that this instrument gives me, but there is some
> line that I would want to change its colour, because there has been an
alarm,
> for instance. And I only can change all the string.
> Is there any way to do this? I don't know.

I've looked into this before and not found a way. As far as I can tell, the
only way is to have a series of string indicators, as many as you want to
display lines, and programmatically scroll the whole th
ing- including the
attributes- each time you want to add a line. You can manually do a
scrollbar if necessary so you can scroll up and down. Tedious and
inefficient.

An alternative would be to go to an external application to do the logging,
via ActiveX. This could be either in a separate window or in an ActiveX
container on the front panel. Excel, Word or any other wordprocessor that's
ActiveX could be used, but it'll involve quite a bit of groundwork. HTML
also could be used, again in a standalone browser or embedded in an ActiveX
container- you could also have pretty little icons next to lines if you want
things to look particularly flash 🙂
0 Kudos
Message 7 of 8
(2,841 Views)
"Craig Graham" wrote:
>>Carlos Jorge Granadino wrote in message>news:38f9b018@newsgroups.ni.com...>>>>
Hi everybody,>>>> I'm getting crazy, because I'm looking for the way to change
the colour of>> the lines I want in the same string indicator.>> I'm doing
an application to control an instrument by serial port, and I'm>> concatenating
the lines that this instrument gives me, but there is some>> line that I
would want to change its colour, because there has been an>alarm,>> for instance.
And I only can change all the string.>> Is there any way to do this? I don't
know.>>I've looked into this before and not found a way. As far as I can
tell, the>only way is to have a series of string indicators, as ma
ny as you
want to>display lines, and programmatically scroll the whole thing- including
the>attributes- each time you want to add a line. You can manually do a>scrollbar
if necessary so you can scroll up and down. Tedious and>inefficient.>>An
alternative would be to go to an external application to do the logging,>via
ActiveX. This could be either in a separate window or in an ActiveX>container
on the front panel. Excel, Word or any other wordprocessor that's>ActiveX
could be used, but it'll involve quite a bit of groundwork. HTML>also could
be used, again in a standalone browser or embedded in an ActiveX>container-
you could also have pretty little icons next to lines if you want>things
to look particularly flash :)>>>>


Thank You Very Much for answering me, but I think I am able to highlight
the line I want using a Multiple Selection Box, with the atributtes Nodes
of the Multiople Selection Box is too much easier than using strings indicators.

Now, I have another question that I do
n't know how to solve. Is there any
array of numbers where I can see the lines that I have chosen?

This is now my new question I hope you will have a great idea.
0 Kudos
Message 8 of 8
(2,841 Views)