Removed options from Save button
The subject says it all: How can I remove options from the toolbar Save button?
I know this question has been asked before, and I've seen a response suggesting finding the ButtonItem in the Preview.Toolbar and directly removing Subitems.
But that approach seems a bit fragile (if a new version comes along that changes these options, my code would break).
I have also seen a suggestion to use RegisteredObjects.FindObject(type).Enabled = false. But that just doesn't seem to do anything.
This is my code (in managed C++):
What am I doing wrong?
(PS: The report uses a PreviewControl that I create myself and assign to the Report->Preview property).
I know this question has been asked before, and I've seen a response suggesting finding the ButtonItem in the Preview.Toolbar and directly removing Subitems.
But that approach seems a bit fragile (if a new version comes along that changes these options, my code would break).
I have also seen a suggestion to use RegisteredObjects.FindObject(type).Enabled = false. But that just doesn't seem to do anything.
This is my code (in managed C++):
FastReport::Utils::RegisteredObjects::FindObject(
FastReport::Export::RichText::RTFExport::typeid)->Enabled = false;
FastReport::Utils::RegisteredObjects::FindObject(
FastReport::Cloud::StorageClient::Dropbox::DropboxStorageClient::typeid)->Enabled = false;
What am I doing wrong?
(PS: The report uses a PreviewControl that I create myself and assign to the Report->Preview property).
Comments
Once I moved my code up, all worked ok.
For the record, what I really wanted to do was remove all the Cloud-related save options, which I am now able to do with: