From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

OI - Replace ListBar with ListBox

I have come to the conclusion that the ListBar control that comes with the Full-Featured GUI will not work for my application. I need the ability to load and select multiple sequence files and the current version of ListBar does not appear to have this capability. For example, if I have opened Seq1.seq, Seq2.seq,...SeqX.seq and want to run Seq3.seq, Seq9.seq without stopping and reselecting. Kind of like sequencing sequence files. The ListBar control only allows one to select a single sequence file to run.

 

Since that is out, I am looking into creating my own version of the ListBar, one that allows for multiple selections. 

 

I've only just started to play with TestStand OI programming having mainly worked with MFC type GUIs so this might be a noob question. Can I use a standard ListBox in place of the ListBar? Put another way, will the standard ListBox work with the File/Execution Managers?

 

Thanks.

 

 

0 Kudos
Message 1 of 5
(3,922 Views)

All of the TestStand UI controls are built on top of the lower-level Engine APIs, so yes you could theoretically build something from scratch which does something similar. You can also mix and match TestStand UI code with lower-level engine code. It is not as simple as using the built-in ListBar though. A standard listbox does not know how to connect with TestStand's UI manager controls. But it is possible to create something that works along with these managers using the lower-level Engine APIs. You might need to handle the UIMessageEvent from the manager controls in order to get a callback to update your lower-level control when certain engine events happen.

 

So the quick answer is, yes, it's doable, but it's not simple/trivial. You might want to try the TestStand List control first and see if that meets your needs, though I'm not sure if it does.

 

-Doug

0 Kudos
Message 2 of 5
(3,901 Views)

MarcBAE,

 

Look in the TestStand help under ListBar and ListBox.  They look pretty interchangeable to me.  Both can connect to either a SequenceFileVIew or ExecutionView Manager control.  Also, both can connect to an Application Manager.  As long as you do the connection correctly you should be good to go.

 

 

ListBar
Use a ListBar control to display multiple pages, where each page contains a list of items users can view or select. Connect a SequenceFileView Manager or ExecutionView Manager control to a ListBar page so users can view and select from a list, such as the active sequence file or execution. Connect an Application Manager control to a ListBox control so users can view or select the default adapter of the TestStand Engine.

You can view the contents of a page by clicking on the page node, and you can also select a single item with the current page. Use the ListBar.CurrentPage property to determine the selected page, and use Pages.Item(CurrentPage).Cursor to determine the selected item on the current page.

 

ListBox
Connect a SequenceFileView Manager or ExecutionView Manager control to a ListBox control so users can view or select from a list of sequence files, sequences, step groups, steps, executions, threads, or stack frames. Connect an Application Manager control to a ListBox control so users can view or select the default adapter of the TestStand Engine.

Use a ListBox control to display multiple pages, where each page contains a list of items that users can view or select. Connect a SequenceFileView Manager control or an ExecutionView Manager control to a ListBox page so users can view and select from a list of sequence files, sequences, step groups, steps, executions, threads, or stack frames.

Use the ListBox control to connect to and display the ExecutionViewMgrConnections.ExecutionList, ExecutionViewMgrConnections.CallStack, and ExecutionViewMgrConnections.ThreadList properties in the ExecutionView Manager control and the SequenceFileViewMgrConnections.SequenceList, SequenceFileViewMgrConnections.SequenceFileList, and SequenceFileViewMgrConnections.StepGroupList properties in the SequenceFileView Manager control.

Selecting an item in the ListBox control updates the application according to the type of connection.

 

Hope this helps,

 

 

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 5
(3,893 Views)

Thanks for the responses. 

 

I too think it's possible but i also think it's not going to be a trivial solution.

 

I did find a similar request/solution using LabView:

http://zone.ni.com/devzone/cda/epd/p/id/3561

 

 

0 Kudos
Message 4 of 5
(3,881 Views)

If you can use the TestStand Listbox control like Jigg is suggesting, that should be relatively trivial, but if that control won't work the way you want, then it would take more signficant work to use a non-TestStand UI control.

 

-Doug

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