NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add items to ListBar

Hi all,
 
I will have a set of sequence files(with path). i want to show them to the user using ListBar in C#. so that the user can choose what the sequence file he want to load and execute. How to add an item to the listBar?? i tried to use this command

axListBar1 .Pages[0].Items.Insert ( itemCaption, iconName, insertBefore)  how should i use this function inorder to show my list of sequence files(ie where should i specify the path of the sequence file ?)

Note: I am binding the listbar control with application manager

If it is not possible Ok i will show it in List Box when the user select a sequence file name i should show the selected file in the sequence window . how this can achieved?

TIA

SRINI

 

 

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

Srini,

Although at first thought one would think that we should go directly to the ListBar object to add a new sequence, the best place to perform this task is to use the Application Manager Control.  The Application Manager Control contains three different functions you can use to load a Sequence File into the ListBar. 

The OpenSequenceFile method lets you define the path to the Sequence File you want to load into the ListBar.  This is probably the function you will be using.  In case you want to give your users more control over which Sequence Files to load, you can use the OpenSequenceFileDialog or OpenSequenceFilesDialog which will pop up a window so the user can select what file to load.

 

Regards,

Santiago D

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

In my case I want to modify the filename that is displayed to the user in the ListBar view.

How would I do that?

0 Kudos
Message 3 of 5
(3,567 Views)
That functionality is not available in the ListBar control. The downside of having controls that do so much behind the scenes for you is that the customization of the controls is limited. You could possibly design your own control to minic the ListBar control with the desired functionality.

Message Edited by Jon M on 08-31-2007 12:43 PM

Test Engineer - CTA
0 Kudos
Message 4 of 5
(3,540 Views)

Hi all:

I meet the same questing: I don't know how to add item in the listbar, I can't use ListBarPageItems.Insert ( itemCaption, iconName, insertBefore)

Boone

boone301@126.com

 

 

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