GUI Architecture

  • Thread starter Thread starter Franck Diastein
  • Start date Start date
F

Franck Diastein

Hi,

I'm making a little app with a treeview in a custom control name UCMenu...

I load my menu with

UCMenu _menu = new UCMenu();

so _menu is an instance of UCMenu...

My problem is that I need to update nodes in treeview inside _menu, but
I can't directly 'touch' it... So I thinked in a static classe where I
can reference my _menu just after creation, something aka:

UCMenu _menu = new UCMenu();
GUIHandler.Menu.Object = _menu;

So, when I need to update a property of _menu I can do something aka:

GUIHandler.Menu.AddNode("My node")...

So my question is, what type of variable do I need to declare in
GUIHandler class to hold Menu.Object ?

In fact I think it must have a standard way of doing this, handling
'dynamic' objects, but I don't know how...

TIA
 
If it is a Tree, why not simply set the datasource? Then the tree should
take care of it from thir.

DataSource can simply be an IList of nodes with Id, ParentID and DisplayText

JIM
 
it's not a matter of source of data...

My problem is that I can't do treeview.nodes.add("my node") because
treeview is in a control loaded dynamically, so I don't know haw to call
it...

Basically I have a menu pane loaded dynamically and I need to fill
treeview from a class...

I don't know how to reach the treeview...

I was thinking in doing a static class to act as a 'bridge', so when I
load my pane, the treeview inside declare's itself into the 'brige
class' and each time I need to access the treeview I do it through de
'bridge class'...

But I don't know how to do it in the 'bridge class'...

Do you understand ?
 
Add a Property ot the surrounding Control that just passes your data through
for you

JIM
 
Back
Top