3D PLM Enterprise Architecture |
User Interface - Dialogs |
CATDlgPushButtonExecutes commands |
Quick Reference |
CATDialog | +---CATDlgControl | +---CATDlgPushButton
The push button is dedicated to execute a command when the user pushes, or clicks, it. As soon as the user pushes on the push button using the mouse key one, or sometimes the Enter key, a notification is sent that you can catch by means of the callback mechanism and trigger then the appropriate command. One or two different notifications can be sent whether the user simply clicks on the push button and releases it immediately, or keeps the push button pressed, if you specify it explicitly. This is expressed in the push button constructor. You can also request that a push button be displayed without a shadow around it. |
Use push buttons whenever you propose to the end user an action to execute.
[Top]
[Top]
The push button is dedicated to executing a command when it is clicked.
[Top]
You can construct different kinds of push buttons:
The push button sends a single GetPushBActivateNotification
,
whether the user clicks on it and possibly keeps it pressed. This is the
default and does not require any specific parameter:
_pApplyPushButton = new CATDlgPushButton (this, "Push"); |
This push button sends a GetPushBActivateNotification when the user
clicks on the push button, and , it sends GetPushBRepetitiveNotification
repetitively as long as the end user keeps the push button pressed. This is
expressed using the keyword CATDlgPusRepetitive
in the push
button constructor as follows:
_pApplyPushButton = new CATDlgPushButton (this, "Push", CATDlgPusRepetitive); |
A style parameter, CATDlgPusNoShadow
, can be used in the push
button constructor if you do not want shadow around the push button, the
default being having shadow:
_pApplyPushButton = CATDlgPushButton (this, "Push", CATDlgPusNoShadow); |
[Top]
Set a callback on a push button for the click interaction as follows:
AddAnalyseNotificationCB( _pPushButton, // push button _pPushButton->GetPushBActivateNotification(), // notification (CATCommand)&Container::MethodToExecute, // method to execute CATCommandClientData iUsefulData); // useful data for this method |
[Top]
The push button title should be set by the resource file using a key built with the identifier you declare as the second parameter of the push button constructor.
[Top]
Version: 1 [Jan 2000] | Document created |
[Top] |
Copyright © 2000, Dassault Systèmes. All rights reserved.