Fixed another small error in windows/tab.c.

This commit is contained in:
Pietro Gagliardi 2015-05-16 20:33:20 -04:00
parent 4667dde5e6
commit b66de79fec
1 changed files with 15 additions and 0 deletions

View File

@ -85,3 +85,18 @@ uiTab *uiNewTab(void)
return uiTab(t); return uiTab(t);
} }
// unfortunately WS_TABSTOP and WS_EX_CONTROLPARENT are mutually exclusive, so we have to toggle between them
// see main.c for more details
void tabEnterTabNavigation(HWND hwnd)
{
setStyle(hwnd, getStyle(hwnd) & ~WS_TABSTOP);
setExStyle(hwnd, getExStyle(hwnd) | WS_EX_CONTROLPARENT);
}
void tabLeaveTabNavigation(HWND hwnd)
{
setExStyle(hwnd, getExStyle(hwnd) & ~WS_EX_CONTROLPARENT);
setStyle(hwnd, getStyle(hwnd) | WS_TABSTOP);
}