_FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusDirection)
{
_Window* pTop = pControl->GetRootWindow();
+ bool isWindowEnabled = pTop->IsEnabled();
+ if (!isWindowEnabled)
+ {
+ return;
+ }
if (pTop)
{
_Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(pControl);
SysAssert(pControlMgr);
_Form* pForm = null;
_Form* pCurrentForm = GetCurrentForm();
+ _Frame* pFrame = null;
const _Control* pTempControl = pControl;
bool isCurrentForm = false;
if (pForm)
{
- break;
+ pFrame = dynamic_cast<_Frame*>(pForm->GetParent());
+ if (pFrame)
+ {
+ break;
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
}
else
{
{
_Form* pForm = null;
_Control* pTempControl = pControl;
+ _Frame* pFrame = null;
while(pTempControl)
{
pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl));
if (pForm)
{
- break;
+ pFrame = dynamic_cast<_Frame*>(pForm->GetParent());
+ if (pFrame)
+ {
+ break;
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
}
else
{