Changing Shortcuts
Posted: Mon Oct 16, 2017 9:44 am
Hello Stimulsoft Team,
We are using your reports embedded in our own Software, therefore I made a inheritance of the StiViewerControl.
Now I'm trying to change some Shortcuts in my Class, because I need the F7-Button(normaly used as "SearchNext") for our own Software.
I would like to change the Shortcut of the "SearchNext"-Button to F3 and remove the shortcuts for the "ZoomOnePage"(F3)- and "ZoomTwoPages"(F4)-Button.
I tried the following Code:
While debugging i can see that the Buttons have the right shortcuts ("ZoomOnePage" and "ZoomTwoPages" have no shortcut, "FindNext" has F3) still the Shortcuts don't work.
How can I force the Shortcuts to be changed?
Kind regards
Daniel
We are using your reports embedded in our own Software, therefore I made a inheritance of the StiViewerControl.
Now I'm trying to change some Shortcuts in my Class, because I need the F7-Button(normaly used as "SearchNext") for our own Software.
I would like to change the Shortcut of the "SearchNext"-Button to F3 and remove the shortcuts for the "ZoomOnePage"(F3)- and "ZoomTwoPages"(F4)-Button.
I tried the following Code:
Code: Select all
public partial class clsStiViewer : Stimulsoft.Report.Viewer.StiViewerControl
{
public clsStiViewer()
{
InitializeComponent();
// Remove the old Shortcuts
this.View.viewerControl.ToolBar.Items["icZoomPages"].SubItems["tbZoomOnePage"].Shortcuts[0] = Stimulsoft.Controls.Win.DotNetBar.eShortcut.None;
this.View.viewerControl.ToolBar.Items["icZoomPages"].SubItems["tbZoomTwoPages"].Shortcuts[0] = Stimulsoft.Controls.Win.DotNetBar.eShortcut.None;
// Set the new Shortcut and change the tooltip
this.View.viewerControl.FindBar.Items["tbFindNext"].Shortcuts[0] = Stimulsoft.Controls.Win.DotNetBar.eShortcut.F3;
((Stimulsoft.Controls.Win.DotNetBar.ButtonItem)this.View.viewerControl.FindBar.Items["tbFindNext"]).AlternateShortCutText = "F3";
}
}
How can I force the Shortcuts to be changed?
Kind regards
Daniel