0

I have some question.

I build Menu as use of tabcontrol and tab with use of forms

I have first form:

enter image description here

Have there some actions - update,delete...


and there is other form

enter image description here

I tried at second form after first form make the differents actions update the combobox where written code of movie immediately when I pass to second tab/form, but it not make anything

Sorry for my bad English and thanks,

Ariel

N B
  • 391
  • 3
  • 12

2 Answers2

0

How are you trying to update the combobox? Check out this question - ComboBox: Adding Text and Value to an Item (no Binding Source) It looks like you first need to override the combobox so you can modify it. Then you need something like this to do it from Form2 (pseudo code);

   Form2_EventHandeler()
   {
          Form1.ComboBox.Add(Form2.TextBoxWithNewInput.Text);
   }
Community
  • 1
  • 1
evanmcdonnal
  • 46,131
  • 16
  • 104
  • 115
0

you can write new public function in form 2

for exmple in form2

public void updateForm()
{
      // readCombo box data from db

}

and call from form 1 after update oder delete for exmple in delete_click or update_click event

N B
  • 391
  • 3
  • 12
  • what you mean call - the combobox? – Ariel Mazin Dec 03 '12 at 17:15
  • I have other form that has connection to first form, but two other combobox, for eaxmaple if i want do delete some item on combobox i want to see the change at second form without close the wf to see that – Ariel Mazin Dec 03 '12 at 22:31
  • ok i often write a function in form 2 this form call functionality for upgrade combobox and call this function from form 1 – N B Dec 04 '12 at 07:15
  • i think i should use the tabs as they are becasue i dont understand what to do – Ariel Mazin Dec 04 '12 at 13:55