473,386 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

GUI Architecture

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
Nov 16 '05 #1
3 1539
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
"Franck Diastein" <fd*******@euskaltel.net> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
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

Nov 16 '05 #2
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 ?

james wrote:
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
"Franck Diastein" <fd*******@euskaltel.net> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
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


Nov 16 '05 #3
Add a Property ot the surrounding Control that just passes your data through
for you

JIM

"Franck Diastein" <fd*******@euskaltel.net> wrote in message
news:eC**************@TK2MSFTNGP12.phx.gbl...
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 ?

james wrote:
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
"Franck Diastein" <fd*******@euskaltel.net> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
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



Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: David Noble | last post by:
We've been developing a web site using 3-tier architecture for 18 months now. There is a common layer that defines the classes - using XML schemas. The data layer acts as a wrapper to 3 databases...
0
by: Vin | last post by:
Hi, I've got a VB.Net + ASP.Net message board application which has already been customized. There are two solutions in this application. 1. The front end aspx, aspx.vb files, User controls...
4
by: apngss | last post by:
what's the differences between collocated architecture and distributed architecture?? My understanding is that collocated architecture has everything in a single machine? i.e. There is only 1...
2
by: hans | last post by:
Hi! I am new to .NET (coming from Java). We have to implement a desktop application which extracts data from a database, does some analysis, filtering etc. and displays the results. I have...
6
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that...
3
by: RAJESH | last post by:
I am working with c# and asp.net in developing web applications, iam using ..netframework 1.1 ,i want to know what is the need of 3-tier or 4-tier architecture in our application development.what...
1
by: benmorganpowell | last post by:
I have a small windows service which connects to a POP3 server at defined intervals, scans the available messages, extracts the required information and inserts the data into a SQL database. I am...
6
by: carsonbj | last post by:
I have an issue where the below operation works on a little-endian architecture but not on a big-endian architecture. I was under the impression that pointer arithmetic is architecture independant...
13
by: rrs.matrix | last post by:
hi i have to detect the type of CPU. whether it is 32-bit or 64-bit.. how can this be done.. can anyone please help me.. thanks.
0
by: srikar | last post by:
Hi all, I am having a problem, when I am compiling the code in 32 bit option on a 64 bit machine using the macro CPPFLAGS= -m32 I am getting the following warnings from the linker . ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.