Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

WPF form - fill combobox with information from the main code

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
543 Views, 2 Replies

WPF form - fill combobox with information from the main code

Hello Everybody!

I am starting to create some forms.

I would like to fill a combobox quth any information (see code below)

Window1 w = new Window1();
						
for (int i = 1; i==5; i++)
{
	string s = i.ToString();
	w.combobox1.Items.Add(s);
}

w.ShowDialog();

TaskDialog.Show("test","Selected number is " + w.combobox1.SelectedItem);

the combobox shoul receive a lis of numbers from 1 to 5, buy I do not why it is empty.

 

Any help?

 

 

thanks in advance and sorry if my question is stupid

2 REPLIES 2
Message 2 of 3
jeremytammik
in reply to: Anonymous

Dear Chema78,

 

There are no stupid questions!

 

Unfortunately, though, this is the wrong place for it.

 

Please note that this discussion forum is dedicated to programming Revit using the Revit API.

 

Therefore, you cannot expect an answer to a question such as yours that has nothing to do with the Revit API here.

 

I hope this clarifies.

 

Thank you for your understanding.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3
Anonymous
in reply to: jeremytammik

Thanks Jeremy!

You are right! this is a general coding question.. I put it here because i am programming with Revit API!!

 

anyway the solution is that i was doing the for wrounly 😞 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report