Need to have same ComboxBox in two Tab Pages of a Tab
Control so that both pages would exhibit same behavour for
Combo events.

Modifying the InitializeComponent() to add the combo to
both the pages did not work. However dynamically adding
the Combo to the selected page on
tabControl1_SelectedIndexChanged event worked. Is this the
right approch?

Can I have two seperate combo and sort of set one equal to
the other so that both Combos exhibit same behaviour for
its events with out duplicating the code (event handlers
etc)


Thanks,

Rajesh Abraham Chacko

Re: TabControl & ComboBox by Paul

Paul
Fri Aug 01 09:15:25 CDT 2003


You can reset the ComboBox Parent property to be the TabControls SelectedTab
property in the SelectedIndexChnaged event

eg.

Private Sub TabControl_SelectedIndexChanged(byval sender as object, byval e
as EventArgs) Handles TabControl.SelectedIndexChanged
ComboBox.Parent = TabControl.SelectedTab
EndSub


"Rajesh Abraham" <chacko97@hotmail.com> wrote in message
news:0a9601c3581c$dd869860$a301280a@phx.gbl...
> Need to have same ComboxBox in two Tab Pages of a Tab
> Control so that both pages would exhibit same behavour for
> Combo events.
>
> Modifying the InitializeComponent() to add the combo to
> both the pages did not work. However dynamically adding
> the Combo to the selected page on
> tabControl1_SelectedIndexChanged event worked. Is this the
> right approch?
>
> Can I have two seperate combo and sort of set one equal to
> the other so that both Combos exhibit same behaviour for
> its events with out duplicating the code (event handlers
> etc)
>
>
> Thanks,
>
> Rajesh Abraham Chacko