Kbase P15457: How to change the button labels for a SmartPanel
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  27/01/2003 |
|
Status: Unverified
GOAL:
How to change the button labels for a SmartPanel
FACT(s) (Environment):
Progress 8.x
FACT(s) (Environment):
Progress 9.x
FIX:
The following is an example of how to change the button labels for a SmartPanel.
DEFINE VARIABLE iNumObjects AS INTEGER NO-UNDO.
DEFINE VARIABLE cObjects AS CHARACTER NO-UNDO.
DEFINE VARIABLE hObject AS HANDLE NO-UNDO.
ASSIGN cObjects = DYNAMIC-FUNCTION('getEnabledObjHdls':U IN h_pupdsav).
DO iNumObjects = 1 TO NUM-ENTRIES(cObjects):
hObject = WIDGET-HANDLE(ENTRY(iNumObjects, cObjects)).
IF hObject:TYPE = "BUTTON":U THEN
CASE hObject:NAME:
WHEN 'btn-save':U THEN
hObject:LABEL = 'newSave':U.
WHEN 'Btn-Reset':U THEN
hObject:LABEL = 'newReset':U.
WHEN 'Btn-Add':U THEN
hObject:LABEL = 'newAdd':U.
WHEN 'Btn-Copy':U THEN
hObject:LABEL = 'newCopy':U.
WHEN 'Btn-Delete':U THEN
hObject:LABEL = 'newDelete':U.
WHEN 'Btn-Cancel':U THEN
hObject:LABEL = 'newCancel':U.
END CASE.
If the panel to be customized is an Update-Transaction panel, the label for the 'Btn-Save' button changes according to the panel status, this label could be changed using the following procedure:
RUN set-label IN h_pupdsav
( INPUT "newLabel").