Michael:
You'll need to store your formatting information and current string
information in a structure and then update the display manually each time
new data is ready to display. You may find you have an easier time using a
picture control display, actually. A picture control takes a picture
control string as an input, which has the information for how to draw the
graphics. Each time the string is passed into the Picture Control's
FPTerminal, the entire graphic is re-rendered from the instructions in the
string. If you want to append further draw information (say, your new
string with particular colors and fonts), you would append that draw info
onto the end of the existing picture string. If you want to stick with a
string control (which I can understand if the text needs to be
editable/copyable by users) then you'll need to update the fonts/colors
each time the value changes. Consider catching the Value Changed event in
an event structure, and using the "Value (signaling)" property of the
string control for each value update.
Pojundery,
Stephen R. Mercer
-= LabVIEW R&D =-
|---------+------------------------------>
| | "Rolf Kalbermatter"|
| | <rolf.kalbermatter@|
| | citeng.com> |
| | Sent by: |
| | <[EMAIL PROTECTED]|
| | army.mil> |
| | |
| | |
| | 02/19/2004 02:12 AM|
| | Please respond to |
| | rolf.kalbermatter |
| | |
|---------+------------------------------>
>------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: "'Michael Sachs'" <[EMAIL PROTECTED]>
|
| cc: "Info LabVIEW (E-mail)" <[EMAIL PROTECTED]>
|
| Subject: RE: text selection - text color bug?
|
>------------------------------------------------------------------------------------------------------------------------------|
"Michael Sachs" <[EMAIL PROTECTED]> wrote:
>I am using the Text.SelStart, Text.SelEnd, Text.FontColor properties to
>color incoming rs232 strings as they are displayed in a text box.
>(I am snooping 2 ports and I need each port to have its own displayed
>color.) The problem is that when you add new text to the display it
reverts
>all the displayed text to the starting color of the first text font. Is
>this a bug or some strange feature that I do not understand?
I certainly don't consider this a bug. By writing a new string to the
terminal you pass COMPLETELY new data to it so there is no reason for
the control to maintain color attributes at specific positions. That
the data happens to be the same as before with some extra information
appended is something the control can't know and in reality shouldn't
even try to bother about.
I guess what you want to have is a string control with a chart graph
behaviour. Highly special and not yet in LabVIEW available as a native
control. Maybe by submitting a wishlist item you could get it for
LabVIEW 8.0 or 9.0 ;-)
Rolf Kalbermatter
CIT Engineering Nederland BV tel: +31 (070) 415 9190
Treubstraat 7H fax: +31 (070) 415 9191
2288 EG Rijswijk http://www.citengineering.com
Netherlands mailto:[EMAIL PROTECTED]