Hi,
I have a panel in my project (C# .NET 2003).
I have multiple radio buttons placed in it.
When I press UP Arrow key, The focus in the screen moves one radio
button DOWN. ofcourse if I press DOWN Arrow key the focus in the screen
will move one radio button UP. I guess this is because of the way the
radio button controls are arranged in the panel control collection.
Could anyone suggest a way to override this behaviour in a way that
when pressing UP Arrow key the focus in the screen will move one radio
button UP and so on...

TIA
Kuchuk

Re: Arrow keys work in opposite direction in panel by Stoitcho

Stoitcho
Tue Sep 19 10:04:10 CDT 2006

kuchuk,

Yes, this is because of the order you add the radiobuttons to the container.
If you do it from code just revererce the order. If you have done it in the
designer that means you have added the radio button on the bottom first and
then the one obove ot and so on. If you use VS2005 it is easy to fix it -
use the 'Tab Order' tool and give the controls the correct order. It looks
like this tool actually changes the controls z-order - exactly what you need
here. If you use VS2003(2) it is not so easy. yuo need to use the 'Bring To
Front'/'Send To Back' commands that is not very easy. Alternatlively you can
change the code in the InitializeComponent.


--
HTH
Stoitcho Goutsev (100)

"kuchuk" <skuchuk@gmail.com> wrote in message
news:1158657234.733665.117780@b28g2000cwb.googlegroups.com...
> Hi,
> I have a panel in my project (C# .NET 2003).
> I have multiple radio buttons placed in it.
> When I press UP Arrow key, The focus in the screen moves one radio
> button DOWN. ofcourse if I press DOWN Arrow key the focus in the screen
> will move one radio button UP. I guess this is because of the way the
> radio button controls are arranged in the panel control collection.
> Could anyone suggest a way to override this behaviour in a way that
> when pressing UP Arrow key the focus in the screen will move one radio
> button UP and so on...
>
> TIA
> Kuchuk
>



Re: Arrow keys work in opposite direction in panel by kuchuk

kuchuk
Wed Sep 20 01:03:41 CDT 2006

Hi,
Already figured out the problem.
I add the radio buttons dynamicly in the code so all that was missing
is to assign the proper TabIndex for each button as I add it to the
container.
Thanks anyway,
Kuchuk


Stoitcho Goutsev (100) wrote:
> kuchuk,
>
> Yes, this is because of the order you add the radiobuttons to the container.
> If you do it from code just revererce the order. If you have done it in the
> designer that means you have added the radio button on the bottom first and
> then the one obove ot and so on. If you use VS2005 it is easy to fix it -
> use the 'Tab Order' tool and give the controls the correct order. It looks
> like this tool actually changes the controls z-order - exactly what you need
> here. If you use VS2003(2) it is not so easy. yuo need to use the 'Bring To
> Front'/'Send To Back' commands that is not very easy. Alternatlively you can
> change the code in the InitializeComponent.
>
>
> --
> HTH
> Stoitcho Goutsev (100)
>
> "kuchuk" <skuchuk@gmail.com> wrote in message
> news:1158657234.733665.117780@b28g2000cwb.googlegroups.com...
> > Hi,
> > I have a panel in my project (C# .NET 2003).
> > I have multiple radio buttons placed in it.
> > When I press UP Arrow key, The focus in the screen moves one radio
> > button DOWN. ofcourse if I press DOWN Arrow key the focus in the screen
> > will move one radio button UP. I guess this is because of the way the
> > radio button controls are arranged in the panel control collection.
> > Could anyone suggest a way to override this behaviour in a way that
> > when pressing UP Arrow key the focus in the screen will move one radio
> > button UP and so on...
> >
> > TIA
> > Kuchuk
> >