version 2003
PA_IsWindowFocusable (windowRef) char
Parameter | Type | Description | |
windowRef | PA_WindowRef | Reference to the window | |
Function result | char | 1 = The window is focusable |
Description
The routine PA_IsWindowFocusable returns 1 if the window wRef is focusable and 0 if it is not.
A focusable window is a window that can receive keyboard events ("get the focus"), even if it is a floating window. When a focusable window receives a keyboard event, it becomes focused. For example, the tool palette of the Form Editor is not focusable. When the user clicks on it, it does not get the focus, which remains in the Editor. On the other hand, the properties palette is focusable. When the user clicks in an editable field (to set a variable name, an object name) of this palette, it takes the focus and the keyboard events.
Example
Toggle between focusable/not focusable.
void ToggleFocusable(PA_WindowRef aWindow) { if(PA_IsWindowFocusable) PA_SetWindowFocusable(aWindow, 0); else PA_SetWindowFocusable(aWindow, 1); }
See Also
PA_GetWindowFocused, PA_IsWindowFocused, PA_SetWindowFocusable, PA_SetWindowFocused.
Error Handling
Use PA_GetLastError to see if an error occurred