Consultor Eletrônico



Kbase P44862: Toggle-box menu-item CHECKED value in a popup-menu reverts t
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   02/10/2003
Status: Unverified

FACT(s) (Environment):

Windows

FACT(s) (Environment):

Progress 9.1D

SYMPTOM(s):

Toggle-box menu-item CHECKED value in a popup-menu reverts to its initial value when the popup menu is assigned to a new widget.

CAUSE:

This is expected behavior.

FIX:

To preserve CHECKED property value of a toggle-box menu item of the original widget (SourceWidget), save it in a temporary logical variable before assigning the parent popup menu to the new widget (TargetWidget) and give it back the saved value after its assignment to the new widget using code similar to:

DO:
DEFINE VARIABLE lTemp AS LOGICAL NO-UNDO.

ASSIGN
hPopupMenu = MENU PopUpMenu:HANDLE
lTemp = MENU-ITEM m_toggle:CHECKED IN MENU PopUpMenu
SourceWidget:POPUP-MENU = ?
TagetWidget:POPUP-MENU = hPopupMenu
MENU-ITEM m_toggle:CHECKED IN MENU PopUpMenu = lTemp.
END.