Consultor Eletrônico



Kbase 16268: How to TAB over widgets without making them insensitive?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
How to TAB over widgets without making them insensitive?

This Knowledge Base entry describes a solution to the following
question:

How can I skip widgets whilst using the TAB key without
making the widgets insensitive and still be able to enter the
widget (e.g. click a button with my mouse to trigger the CHOOSE
event)?

The solution to this is discussed below:

Create an internal procedure called f.i. Widget_Tab_Exclude, which
contains the following:

PROCEDURE Widget_Tab_Exclude :
IF LAST-EVENT:EVENT-TYPE = "KEYPRESS" THEN DO:
IF LAST-EVENT:LABEL = "TAB" THEN DO:
par_handle = SELF:NEXT-TAB-ITEM.
IF par_handle = ? THEN
par_handle = SELF:PARENT.
APPLY "ENTRY" TO par_handle.
END.
ELSE
IF LAST-EVENT:LABEL = "SHIFT-TAB" THEN DO:
par_handle = SELF:PREV-TAB-ITEM.
APPLY "ENTRY" TO par_handle.
END.
END.
END PROCEDURE.

Then on the ENTRY event of the widget you want to skip with the
TAB key, use an include file reference, f.i. (widgexc.i}, which
contains the next two lines:

RUN Widget_Tab_Exclude.
IF LAST-EVENT:EVENT-TYPE = "KEYPRESS" THEN RETURN NO-APPLY.


REFERENCES TO WRITTEN DOCUMENTATION
===================================
Programming Handbook
Progress Language Reference, volume 1 and 2

Progress Software Technical Support Note # 16268