Skip to main content
Participant
January 14, 2013
Question

SDKFolderChooser: how to change the dialog's title

  • January 14, 2013
  • 1 reply
  • 761 views

Hi

I am developing a InDesign CS5.5 plugin.

I am using SDKFolderChooser (from .../source/sdksamples/common/SDKHelper) to allow a user to select a folder.

But I don't know how to change the dialog's title:

SDKFolderChooser folderChooser;

folderChooser.SetTitle("My title");

folderChooser.ShowDialog();

SetTitle don't replace the default title "Select a folder" !

Can anyone help me?

Thanks

Regards

This topic has been closed for replies.

1 reply

Participating Frequently
January 14, 2013

Try making the "My title" string a PMString, like below:

SDKFolderChooser folderChooser;

PMString title("My title");

folderChooser.SetTitle(title);

folderChooser.ShowDialog();

if (!folderChooser.IsChosen())

{

     break;

}

// Do something with the chosen folder, like.. folderChooser.GetIDFile();

dchikhAuthor
Participant
January 14, 2013

Thank you for your response but don't solve it.

However, in the ShowDialog method, I replace one parameter

bool16 folderSelected =  selectFolderDialog->DoDialog(nil,
  resultFolders,
  kFalse, // only one selection
nil,
  &(this->fTitle));

by

bool16 folderSelected =  selectFolderDialog->DoDialog(nil,
  resultFolders,
  kFalse, // only one selection
  &(this->fTitle),
  &(this->fTitle));

And it's now working:

Thanks

Participant
August 29, 2024

This is still a bug in 2024.
It is setting the info message, not the title, the 4th param for

virtual bool16 DoDialog(IDFile *defaultFile, SysFileList &resultFiles, bool16 allowMultipleFiles = kTrue,
							const PMString *title = nil, const PMString *infoMessage = nil) = 0;