ListView acess form command

Hi,

I have the following problem:
I have a dockable panel on rhino, this panel contains a listview that is loaded inside the panel,and
the update method.

I try acess this listview items from a custom command that I made to update some items, the
problem is, how can I access this listview from the command?

I try inside command ex:

ClassList li = new ClassList();
li.update(some);

This dont work because is a new objet and not the same listview on ClassList.

So, Any idea?

Hi @MatrixRatrix,

If there is only one instance of your panel and it’s list control, then you might put an static Instance property on it, which returns the one and only object.

– Dale

Hello @dale, sorry dont understand.

I have a dockable panel form “SampleCsWinFormPanel.cs” , how I change this instance?

public partial class SampleCsWinFormPanel : UserControl

Thanks

@Dale,

Do not bother you, I already solved it.