Working with Listboxes

This is probably fairly simple but for some reason it's taking me awhile to figure it out so I'm going to just ask the pros...

I'm looking to fill a listbox after the user selects from another listbox in the PMP (Property Manager Page) for an Addin. 

From what I can tell the 'UserPMPage.vb' handles setting up the PMP and the 'PMPHandler.vb' is where code would go to react to making a selection of the first listbox.

I don't know how to go about refreshing the PMP page after a selection from the listbox is highlighted. 

SolidworksApi macros
Answers 3
SF
SF 2012-01-23 Best Answer

 

I have attached some of the code I'm working with.  Hopefully by looking at it you can get a good idea as to what I'm trying to do.

comment imagecomment image
BL
BL 2012-01-24

Hi,

What I think you should do is using the IPropertyManagerPage2Handler8 event OnListboxSelectionChanged.

Then check if the list that changed is the first list and then clear the 2nd list of items and insert the items matched to the selection from the 1st list.

Cheers,

Bnaya Livne

RR
RR 2012-01-24

test the following:

instead of putting

List2.AddItems (numberitems)

Type the following

PMPHandler.List2.AddItems (numberitems)

I do this test and it worked