Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic can't find my listBoxes on my flowChart (Read 6154 times)
lemon
YaBB Newbies
*
Offline



Posts: 28
Joined: Aug 31st, 2005
can't find my listBoxes on my flowChart
Sep 8th, 2005 at 7:19am
Print Post  
Hallo,

to each node I provide a listBox. how can I all listBox-Controlls address at one time.
I can't add a listBox to my flowChart-Controll. How can I get my listBox-Object IDs?

tnx for support

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: can't find my listBoxes on my flowChart
Reply #1 - Sep 8th, 2005 at 7:37am
Print Post  
Hello,

Just how do you provide a ListBox to each node ? Do you mean you have ListBoxes hosted in ControlHost nodes ? If so, use the ControlHost's Control property to access the embedded .NET controls.

Sorry if I haven't understood your question correctly.
  
Back to top
 
IP Logged
 
lemon
YaBB Newbies
*
Offline



Posts: 28
Joined: Aug 31st, 2005
Re: can't find my listBoxes on my flowChart
Reply #2 - Sep 8th, 2005 at 8:02am
Print Post  
many more simply!

during I provide a new box. I provide a listBox controll, too

like this:

InfoBox = new ListBox();
InfoBox.Items.Add(box.Text);
InfoBox.Location = new System.Drawing.Point((int)box.BoundingRect.X+15, (int)box.BoundingRect.Y);
...
InfoBox.BringToFront();

No more.

I will create a methode how can change a InfoBox attribute. For this I must find all my created InfoBoxes. But how???
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: can't find my listBoxes on my flowChart
Reply #3 - Sep 8th, 2005 at 8:45am
Print Post  
You mean you create the ListBoxes inside the form and display them over the FlowChart ? Then you can access them via the form's Controls collection which contains all its child controls. You might also store a reference to the ListBox in its associated box' Tag property, or just the listbox' index within the form's Controls collection.

I hope that helps.
  
Back to top
 
IP Logged
 
lemon
YaBB Newbies
*
Offline



Posts: 28
Joined: Aug 31st, 2005
Re: can't find my listBoxes on my flowChart
Reply #4 - Sep 8th, 2005 at 8:48am
Print Post  
this works thanks

foreach (Control c in this.Controls)
if (c is ListBox)
((ListBox) c).Visible = true;
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint