How to detect Cancel button click n TRzSelectFolderDialog

Have a Raize Components question that does not fit into any of the forums below? Post it here.

How to detect Cancel button click n TRzSelectFolderDialog

Postby dkjMusic » Mon Mar 20, 2017 9:59 am

Is there a way to do this?

Posts: 4
Tue Mar 07, 2017 2:55 pm

Re: How to detect Cancel button click n TRzSelectFolderDialo

Postby Raize Support » Mon Mar 20, 2017 4:48 pm


This post should really go in the Shell forum.

Anyway, the TRzSelectFolderDialog component is design much like other dialog components in that the Execute method returns a Boolean indicating whether or not the user clicked OK or Cancel. Therefore, you can do something like the following to determine if the user clicked the Cancel button:

Code: Select all
procedure TForm17.RzButton1Click(Sender: TObject);
  if RzSelectFolderDialog1.Execute then
    ShowMessage( 'Selected Folder: ' + RzSelectFolderDialog1.SelectedPathName )
    ShowMessage( 'Selection Cancelled' );

Raize Software Support
Raize Software
Raize Support
Posts: 612
Fri Mar 25, 2011 9:04 pm

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest