Re: Odd problem with SelectedIndexChanged event of TabControl



What was the value before you set it 0? If it was already 0 then it will not
have changed and, therefore, will not fire the SelectedIndexChanged event.

Where are you changing the value? The event will not be called until after
the control has been created.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.htm

"Martin" <unko@xxxxxxxxxxxxxxxx> wrote in message
news:D11038F0-5596-49FE-9D9A-55339DDCDAD0@xxxxxxxxxxxxxxxx
When I set the SelectedIndex of a tabcontrol programmatically, the
SelectedIndexChanged will not fire if I set the index to 0;

MyTabControl.SelectedIndex = 0

It does fire with a value of 1, but since the index is zero-based, that
will
select the 2nd tab.

What can be wrong here?

--
It''''s Software Jim, but not as we know it!


.



Relevant Pages


Loading