DockTop, ZOrder and TabIndex
Hello there
in my .NET Compact Framework 2.0 SP2 C# WM 5 Smartphone application, I've a
form with some panels, all panels are Dock = Top and in any panel there is a
TextBox.
I need this layout because depending on some settings we hide or show some
panels and in this way the panels are always visible and stacked from the
top without empty spaces.
the problem is that with this design, the tabindex is ignored and the focus
moving is flipped so to go down I should use the up button (actually moving
the joypad of my qtek 8310) and to go up I should use the down button.
Any Idea ?
I don't want to grab or handle the Got/Lost focus events because many
controls (textboxes) can be hidden and if so I should write more and more
code....
best practices ? I simply want to use down arrow to pass the focus in the
next panel but it seems the down panel has higher zorder so to go down I
have to go up ??!?! :-(((
Thanks in advantage, sincerely, Davide.
Date:Tue, 31 Jul 2007 15:17:49 +0200
Author:
|
Re: DockTop, ZOrder and TabIndex
Hi Davide,
Just add the panel and set the taborder to the panel in reverse order.
something like this
for (int j = i - 1; j >= 0; j--)
{
objPanel[j].Parent = this;
((Control)objPanel[j]).TabIndex = j;
}
Panel doesn't have Tabindex so casting required.
Lets say i is 10(panels), you would have added in reverse Z order to
its parent, then set the tabindex to the panel in the same order.
Hope this helps,
Cheers,
Arun
On Jul 31, 6:17 am, "Eu Man" wrote:
> Hello there
> in my .NET Compact Framework 2.0 SP2 C# WM 5 Smartphone application, I've a
> form with some panels, all panels are Dock = Top and in any panel there is a
> TextBox.
>
> I need this layout because depending on some settings we hide or show some
> panels and in this way the panels are always visible and stacked from the
> top without empty spaces.
>
> the problem is that with this design, the tabindex is ignored and the focus
> moving is flipped so to go down I should use the up button (actually moving
> the joypad of my qtek 8310) and to go up I should use the down button.
>
> Any Idea ?
> I don't want to grab or handle the Got/Lost focus events because many
> controls (textboxes) can be hidden and if so I should write more and more
> code....
>
> best practices ? I simply want to use down arrow to pass the focus in the
> next panel but it seems the down panel has higher zorder so to go down I
> have to go up ??!?! :-(((
>
> Thanks in advantage, sincerely, Davide.
Date:Fri, 03 Aug 2007 15:25:53 -0700
Author:
|