Define arrow key behaviour in multi-row textboxesΒΆ
!compat textbox |
Define arrow key behaviour in multi-row textboxes |
SYNTAX
!compat textbox = 3
This declaration causes the UP and DOWN ARROW keys to exit from a grouped multi-row textbox, UP ARROW exiting from the top row and DOWN ARROW from the bottom row and moving to the next textbox in the group. This was how programs compiled with versions of Sculptor earlier then 4.2 behaved.
The declaration is only necessary if backward compatibility is required, which would only occur if programs trap the event code EV_LOSE_FOCUS and scroll the textbox if the key pressed was the UP or DOWN ARROW key (tested by the keycode() function).
If this declaration is absent, Sculptor versions 4.2 and later ignore UP ARROW on the top row, and DOWN ARROW on the bottom row of a grouped multi-row textbox. The focus remains on the current row.
The declaration !compat textbox = 3 is contained (commented out) in the standard include file $SCULPTOR/include/local.h (which is itself included in $SCULPTOR/include/sculptor.h.) To use the declaration, remove the comment marks.
NOTES
Only grouped multi-row textboxes are affected. The UP and DOWN ARROW keys never moved focus out of ungrouped multi-row textboxes.
The sample program $SCULPTOR/demo/misc/scroll.f demonstrates a better way to handle the scrolling of multi-row textboxes.
RELATED TOPICS |