Kbase 20342: How to Toggle Between UIB and Object Palette Without a Mouse
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  25/09/2009 |
|
Status: Verified
GOAL:
How to toggle between the AppBuilder UIB and the Object Palette at design time without using a mouse.
GOAL:
How to customize AppBuilder behavior using the _adeevent.p
FACT(s) (Environment):
Windows
Progress 9.x
OpenEdge 10.x
FIX:
1) Create a subdirectory .\WRK\adecomm. in the working directory
.\WRK.
2) Use the PROLIB utility with the -yank parameter to extract a
copy of the _adeevent.p file from the %DLC%\src\adecomm.pl
library to .\WRK\adecomm.
3) Insert the following statement after the variable definitions
at the end of _adeevnt.p:
IF p_event = "Startup":U AND
LOOKUP(p_product,"Editor,UIB":U) > 0 THEN
ON 'F12':U ANYWHERE PERSISTENT RUN Toggle.p.
4) Save the modified _adeevnt.p in .\WRK\adecomm.
5) Copy the procedure Toggle.p (shown below) and save it in
.\WRK\adecomm.
6) Ensure that .\WRK\adecomm is in your PROPATH before anything
else.
Here is the Toggle.p procedure:
/* Toggle.p procedure which must reside in .\WRK\adecomm directory */
DEF VAR hWindow AS HANDLE NO-UNDO.
DEF VAR hChild AS HANDLE NO-UNDO.
hWindow = SESSION:FIRST-CHILD.
IF CURRENT-WINDOW:TITLE = "Palette" THEN
DO:
hWindow = CURRENT-WINDOW:PARENT.
APPLY "ENTRY" TO hWindow.
CURRENT-WINDOW = hWindow.
END.
ELSE
DO WHILE VALID-HANDLE(hWindow):
IF hWindow:TITLE = "AppBuilder" THEN
DO:
hChild = hWindow:FIRST-CHILD.
DO WHILE VALID-HANDLE(hChild):
IF hChild:TITLE = "Palette" THEN
DO:
CURRENT-WINDOW = hChild.
APPLY "ENTRY" TO hChild.
LEAVE.
END.
hChild = hChild:NEXT-SIBLING.
END.
END.
hWindow = hWindow:NEXT-SIBLING.
END.