You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Carlo Barazzetta edited this page Aug 21, 2024
·
2 revisions
AutoClick / AutoClickDelay Guide
StyledButtons can invoke OnClick event automatically, after a Delay time, activating "AutoClick" option.
Properties to activate "AutoClick" option:
AutoClickDelay (Integer): Delay in milliseconds to "auto click" the Button (default 5000).
AutoClick (Boolean): Start the "auto click" process (default False).
By default the AutoClick property is set to False.
When AutoClick is set to True, the button starts to "paint" itself with a "hot color". The painting process continues for a time defined in AutoClickDelay.
At the end of the AutoClickDelay time, (when the button is "full painted"), the button click itself and reset AutoClick property.
Also the StyledTaskdialog can use this function to AutoClick and close the Dialog.
In the Demo you can see this code, to call two different versions of a Styled TaskDialog with the AutoClick option:
if cbUseCommandLinks.Checked then
DoStyledTaskMessageDlg(
'Dialog Title - use Command Links', LMessage,
TMsgDlgType.mtConfirmation,
[mbAbort, mbRetry, mbIgnore], 0, LAutoClickDelay, True)
else
DoStyledTaskMessageDlg('Dialog Title - use normal Buttons', LMessage,
TMsgDlgType.mtWarning,
[mbOK, mbCancel], 0, LAutoClickDelay, False)
If the user does not respond to the dialog box, it will close on its own!
TaskDialogDemo Demo:
Look also in the TaskDialogDemo located in the folder: