Source language: Translate to:

Detect Cancel

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Detect Cancel

Postby Jim Brammer » Thu Feb 07, 2002 5:17 pm

Don't know if this issue have been discussed before, but how do i detect if someone hits the cancel button in the FolderBox dialog? Or in an FileOpenBox?
Is it somehow possible to use the If statement here?
There is something in the back of my head telling me that this can be done.



<hr>



Not sure if this is what you mean.

I guess it depends on what you mean by hit the cancel button. If you mean that they opened the dialog and then cancelled and nothing was returned, you could use the IF statement like this.

Set your Folderbox returning variable to [myselection].

If "[myselection]" "=" ""
SetVar "[status]" "Cancelled"
Endif

However you will get the null return if you hit the close window system button X in the corner also.

If you mean to actually push the button. Haven't got a clue.

Don



<hr>



The problem were already taken care of in NeoBook, the variable don't change if the Cancel button are clicked. I was thinking in Delphi language, If Opendialog1.execute.... and so on. Thanks anyway fellas..  




spider-food:
fileopenbox, filesavebox, folderbox, inputbox, cancel
Jim Brammer
 

Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 1 guest