c# - How to move a button with a filled combobox? -
how can let button loop move if click on combobox @ number one, has same button1. if same button loop has move button1?
can me?
this code :
private void haalop_click(object sender, eventargs e) { try { streamreader sr = new streamreader(@"d:\programeren\blokboek4\week5\week5toets\week5toets\bin\debug\bestemmingen.xml"); string line = sr.readline(); while (line != null) { combox.items.add(line); line = sr.readline(); } } catch (exception ex) { messagebox.show("error : " + ex.message); } } private void loop_tick(object sender, eventargs e) { if (true ) { } } private void combox_click(object sender, eventargs e) { if (combox == "") { } }
the buttons called but1 but2 but3 but4 5 but6 , have combobox.
take of selectedindex
property of combobox , use create id of button. select control using this.controls.find()
. more details available at: https://msdn.microsoft.com/en-us/library/system.windows.forms.control.controlcollection.find(vs.80).aspx
Comments
Post a Comment