LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

inversion of a particular character in string control

 I want to select i.e invert a particular character of a sting on string control (i.e say the array of characters is "12.346" , now I want a single character to be inverted .For this what should I do , reply plz . I know how to invert a full string by using SetCtrlVal(panel,ControlID); .
 
With Regards
Subrata
0 Kudos
Message 1 of 5
(3,488 Views)

As with all questions of this type, you would do well to look first in the CVI help at the attributes available for the control you want to manipulate.

Set the ATTR_TEXT_SELECTION_START and ATTR_TEXT_SELECTION_LENGTH attributes to select the portion of the string you want.

--
Martin
Certified CVI Developer
Message 2 of 5
(3,485 Views)

 

Dear Martin ,

           Having gone through your answer I have come to know the names of the control attributes , but I can't make out how to set the       Attributes that you mentioned .I set that ,

                                          ATTR_TEXT_SELECTION_START =1;

                                         ATTR_TEXT_SELECTION_LENGTH=3;

But telling "Lvalue required " .

So,if possible plz write the function regarding a particular character selection of a string in string control .

 

Subrata

 

0 Kudos
Message 3 of 5
(3,461 Views)

Hello Martin ,

    Finally I have come to know how to set . Thanks ........

subrata

0 Kudos
Message 4 of 5
(3,460 Views)
Hey Subrata,

I'm assuming from your previous post you already found this, but for any others that might have this question, you will need to use the SetCtrlAttribute function to set the values of ATTR_TEXT_SELECTION_LENGTH and ATTR_TEXT_SELECTION_START.
Pat P.
Software Engineer
National Instruments
0 Kudos
Message 5 of 5
(3,431 Views)