vins
3rd February 2009 07:47 UTC
Disable the Cancel Function of CANCEL button
Hi,
i need to use the default CANCEL button for other functions like generating log,refresh etc..instead of creating a new button.I am able to rename the cancel button,but still functions the same as CANCEL button.
For example: I need to use the CANCEL button for generating log of my application,how to write code on the Click function of the CANCEL Button.
Please refer the attached screenshot.
thanks in advance
kichik
3rd February 2009 12:06 UTC
You can do what you need in .onUserAbort and then call Abort to cancel the cancel operation.
vins
4th February 2009 04:28 UTC
thanks much!!!
-VINS
vins
4th February 2009 04:55 UTC
Like that how to cancel the close operation of CLOSE button on the right side of the window?
-VINS
kichik
4th February 2009 11:31 UTC
Yes, it's the same function.
vins
4th February 2009 12:18 UTC
I am a newbie..please guide....
When I use below function, CANCEL button is operating(tats in the left side in pic) and moreover the X-close in top right also intiating the same function as CANCEL.tats y planned to write this code in the click of CLOSE button(in the right side)
Function .onUserAbort
MessageBox MB_YESNO "Do you want to view more information?" IDYES ViewLog
Abort
ViewLog:
nsExec::Exec "$PLUGINSDIR\sys.bat"
ExecShell "" "log.txt"
Abort
FunctionEnd
-VINS
kichik
4th February 2009 21:25 UTC
The X button is linked to the Cancel button, so you can't have it not do that. Maybe you can use the HelpButton plug-in for what you're looking.
vins
5th February 2009 04:05 UTC
thank u Kitchik....let me try...
-VINS