|
Infralution Support Support groups for Infralution products
|
View previous topic :: View next topic |
Author |
Message |
aderson
Joined: 20 Oct 2010 Posts: 1
|
Posted: Wed Oct 20, 2010 7:09 am Post subject: tab key focus behavior in tree's columnn with editor set |
|
|
there are two columns in virtual tree.I set column A's editor to custom control. This custom control consist of one textbox and one button. The hehavior of custom control in form is press tab key , the textbox get input focus,press tab key again, the button gets input focus,then press enter ,a dialog popup.
The requirement is when set cell's editor in virtual tree to this custom control.the behavior needs the same as in form while press tab key . Not currently column B get focus when I press tab key again.
How do I implement it? whether there is a property in virtual tree or cell can affect tab focus or needs write some code?
Thanks in advance
aderson |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Oct 21, 2010 1:02 am Post subject: |
|
|
To enable tabbing within the editor control you would need to derive a new VirtualTree control and override the ProcessEditTabCmdKey as shown below.
Code: | public class MyTree : VirtualTree
{
protected override bool ProcessEditTabCmdKey(Keys modifiers)
{
if (EditWidget != null)
{
ContainerControl control = EditWidget.EditorControl as ContainerControl;
if (control != null)
{
bool forward = (modifiers != Keys.Shift);
if (control.SelectNextControl(control.ActiveControl, forward, true, true, false))
return true;
}
}
return base.ProcessEditTabCmdKey(modifiers);
}
} |
_________________ Infralution Support |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|