How to close a StiPreviewControl using ESC Key?
Posted: Sun Jun 22, 2008 4:32 am
Can you please tell me how to enable the StiPreviewControl to close if I press the escape key (ESC).
I also would like to know how the config.CloseEnabled works (example
I do
#region ToolBar
//Do this operation once when running the program
StiConfig.Load();
//Get service
StiPreviewConfigService config =
StiConfig.Services.GetService(typeof (StiPreviewConfigService)) as StiPreviewConfigService;
//Turn off all buttons of changes of the rendered report
// config.PageNewEnabled = false;
if (config != null) {
config.CloseEnabled = true;
config.ToolEditorActive = false;
config.ToolEditorEnabled = false;
config.PageDesignEnabled = false;
config.PageDeleteEnabled = false;
config.PageNewEnabled = false;
config.PageSizeEnabled = false;
config.OpenEnabled = false;
config.SaveEnabled = true;
}
//Save configuration if necessary
StiConfig.Save();
#endregion
The close button appears but when I click nothing happens
Thanks in advance.
I also would like to know how the config.CloseEnabled works (example
I do
#region ToolBar
//Do this operation once when running the program
StiConfig.Load();
//Get service
StiPreviewConfigService config =
StiConfig.Services.GetService(typeof (StiPreviewConfigService)) as StiPreviewConfigService;
//Turn off all buttons of changes of the rendered report
// config.PageNewEnabled = false;
if (config != null) {
config.CloseEnabled = true;
config.ToolEditorActive = false;
config.ToolEditorEnabled = false;
config.PageDesignEnabled = false;
config.PageDeleteEnabled = false;
config.PageNewEnabled = false;
config.PageSizeEnabled = false;
config.OpenEnabled = false;
config.SaveEnabled = true;
}
//Save configuration if necessary
StiConfig.Save();
#endregion
The close button appears but when I click nothing happens
Thanks in advance.