05-13-2009 02:43 PM
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.
Solved! Go to Solution.
05-13-2009 02:49 PM
ListBar.Pages contains the Pages collection. For a specify Page, Page.Items contains the items collection.
05-13-2009 02:59 PM
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".
05-13-2009 03:29 PM
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).
05-13-2009 03:58 PM
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?
05-13-2009 04:06 PM
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.)
05-13-2009 04:32 PM