Kamal 99 posts since
Oct 17, 2007
1.
Re: Don't want to tab to one control and make the control can take focus at the same time. Nov 5, 2007 8:46 PM
Basically you want the control not participate in the traversal. For this you will need to subclass the control and override the "become-active-from-traversal" method. It should return false. Here is some code that makes the CommandButton (a control) behave the way you want.
{define-class package MyCommandButon {inherits CommandButton}
{constructor package {default
label:#Label = "CommandButton", ||""
reactive-label:#ReactiveLabel = null,
style:CommandButtonStyle =
CommandButtonStyle.standard,
text-breakable?:bool = false,
ui-object:#CommandButtonUI = null,
...
}
{construct-super
label = label,
reactive-label = reactive-label,
style = style,
text-breakable? = text-breakable?,
ui-object = ui-object,
...
}
}
{method public open {become-active-from-traversal forward?:bool=true}:bool
{return false}
}
}
This button "MyCommandButton" will take focus, but will not participate in the traversal.