NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

axListBar in .NET

Solved!
Go to solution

How will I load items of sequence in the axListBar? I notice that it does not have any items property. My sequence will come from the database and I need to load it programmatically.

0 Kudos
Message 1 of 7
(4,334 Views)

ListBar.Pages contains the Pages collection. For a specify Page, Page.Items contains the items collection.

0 Kudos
Message 2 of 7
(4,333 Views)

Thanks for the reply!

 

I notice when I load my app and call this line 

 

this.axSequenceFileViewMgr.ConnectSequenceFileList(this.axListBar.Pages[0], false)

 

it is automatically loading the previous sequence I used  - where is it saving it? registry?

 

Can you please show me sample code for loading in axListBar?

 

When I tried playing with it and use type in this code  

 

axListBar.Pages[0].Items.Insert(
"aa.seq", "ss", 0);

its throwing me an error of "Error trying to modify read only page".

0 Kudos
Message 3 of 7
(4,331 Views)
Solution
Accepted by topic author -mbda-

The previous sequence files are automatically loaded depending on the setting for ApplicationMgr.ReloadSequenceFilesOnStart. The list of files to reload is persisted with other settings in ApplicationMgr.ConfigFilePath.

 

I bet the page is read-only because you already connected the page to a list. Either you should manage the items, or let a connection do it. You can, however, influence what is in the list you connect to. For example. You can call ApplicationMgr.OpenSequenceFile() to add a file to the list SequenceFiles list. You can set SequenceFileViewMgr.SequenceFile to specify which file in the list is the selected file (from the point of view of that SequenceFileViewMgr).

0 Kudos
Message 4 of 7
(4,327 Views)

Thanks James!

 

I am almost there, another question in inserting items in the axListBar, another required parameter is stringIconName. I tried the path of the icon, just filename and even created imagelist but neither of those work.

Any idea what am I doing wrong?

0 Kudos
Message 5 of 7
(4,323 Views)

The name must be the filename (not full path) of an icon file that TestStand loads at startup from the NI and User components directories.

 

Teststand loads icon  files from:

C:\Program Files\National Instruments\TestStand 4.2\Components\Icons\

C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.2\Components\Icons\

 

(The actual paths vary based OS, TS Version, and installation directories you choose.)

Message 6 of 7
(4,321 Views)
Thanks a lot! they could have added that in the parameter description.
0 Kudos
Message 7 of 7
(4,316 Views)