LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SetCtrlVal() with textbox - function does not work as intended?

Solved!
Go to solution

I use this command to update a textbox with a timer:    

 

SetCtrlVal   (MyPanel,  MyPanel_MyTextBox,  SomeText);

 

It keeps adding 'SomeText' into MyTextBox instead of setting it with that value.  It only works as I want when I use:

 

ResetTextBox   (MyPanel,  MyPanel_MyTextBox,  SomeText);

 

Is this supposed to be the way SetCtrlVal() work, because that is how I understand it?

 

0 Kudos
Message 1 of 3
(4,523 Views)
Solution
Accepted by topic author hn_sofec

Yes, this is the way it is expected to work... as you can see from the help on "Programming with Text Box Controls", SetCtrlVal appends text

0 Kudos
Message 2 of 3
(4,521 Views)

Thanks, I think it is a misnomer.  Should be called AppendCtrlVal().

0 Kudos
Message 3 of 3
(4,519 Views)