04-26-2007 06:56 AM
04-26-2007 08:03 AM
04-26-2007 08:09 AM
I use two different ways to do this.
1) use a listbox instead of a text box and use
InsertListitem(PanelHandle, controlID, StringVal, 0); // the 0 is an arbitrary number not pertitnent
GetNumListItems(PanelHandle, controlID, &count);
SetCtrlIndex(PanelHandle, controlID, count-1 );
Alternately, you could do:
InsertListitem(PanelHandle, controlID, StringVal, itemsAddedCount);
SetCtrlIndex(PanelHandle, controlID, itemsAddedCount );
itemsAddedCount++;
2) if you want to keep a Textbox, if you use
InsertTextBoxLine(PanelHandle, ControlID, -1, StringVal);
it adds the string in stack format (last string is on top) and then the scroll bar stays at the top to show the most recent additions. You have to get used to looking at it from bottom up instead of top down to view the items as they occurred.
04-26-2007 01:11 PM
Roberto, I had been using SetCtrlAttribute, so going to SetCtrlVal was quick and easy and it worked exactly as you said.
Thanks to all
04-26-2007 09:10 PM
09-03-2008 03:29 AM
I am having exact the same problem.
I have been clicking around for ages, but where are these "properites" hidden away???????????
Is there a reference sample vi that someone can put up here?
09-03-2008 03:49 AM
I can suggest you two ways to have a list of attributes applicable to a specific control:
1. Right-click on the control and select "Control help": in the control overview page of the online help you can choose you can select "control attributes" hyperlink to jump to a list of all attributes related to the specific control you are using (the same applies for functions and events)
2. Open the function panel for SetCtrlAttribute ( ) function, click "Control attribute" field next choose the control you are interested on in "Control type" field on top of the windows that appears: the list of attributes will show active only the attributes applicable to that control type, while the others are grayed out