LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

labwindows cvi textbox

Solved!
Go to solution
I worked with textbox and I got an erros such as: the control passed is not a textbox, but I passed the correct control!! How is it possible???
0 Kudos
Message 1 of 7
(6,586 Views)

It's not easy to try guessing what's happening with so few elements.

Can you give us some more details: which CVI version are you using, which OS, an abstract of your code, a sample panel...?

Message Edited by Roberto Bozzolo on 02-06-2009 09:34 PM


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 7
(6,579 Views)

Hi,

Just a guess: 

If your textbox is inside a tab page then you should call GetPanelHandleFromTabPage first to get a handle and use that handle for SetCtrlVal and other similar functions as the first parameter.

Hope this solves your problem.

Regards, 

S. Eren BALCI
IMESTEK
0 Kudos
Message 3 of 7
(6,565 Views)
I have the version of the program 7.1. I've created a panel, and I took from a list the string of char that I want to put in the text box that is in another panel. I took the string with GetLabelFromIndex and I have the string in a variable "patname". So now I have to put this string of char in a textbox, but i can't use setctrlvalue becouse it doesn't work with char!! How can I put the string in the text box??? I tried with: InsertTextBoxLine but there is an error : "the control passed is not a text box". But the control that i passed is a textbox!! How can it be possible?? Thank you for your answer! kisses
0 Kudos
Message 4 of 7
(6,539 Views)
Solution
Accepted by topic author Nicla-

Hi Nicla,

SetCtrlVal function actually works with character strings. You can write:

char path[256];
 
GetLabelFromIndex (panel1, PANEL1_LIST, index, path);
SetCtrlVal (panel2, PANEL2_TEXTBOX, path);

 

Besides, I doubt that you are confusing a 'string control' with a 'textbox control'. A string control is single line box in which you can type/display a pathname or any other string.

A textbox can be multiline with scroll bars, etc.

You cannot be blamed for this. Because the term "textbox" is also used as a name for the general single line version (which NI calls a string control) by the computer users.

 

Anyway, you should be able to use SetCtrlVal for both string and textbox type of controls.

Hope this helps, 

S. Eren BALCI
IMESTEK
0 Kudos
Message 5 of 7
(6,532 Views)
thank you!!!!! Smiley Happy
0 Kudos
Message 6 of 7
(6,526 Views)

This is a very simple question, but I have not been able to learn the answer. What is the max # of character a textbox can hold? When this # is exceeded what is the error generated?

0 Kudos
Message 7 of 7
(5,605 Views)