Adding button to toolbar v2015.3
- poweredbyporkers
- Posts: 28
- Joined: Fri Nov 29, 2013 8:42 pm
Adding button to toolbar v2015.3
How can I add a button to the preview windows toolbar? I can't find StiStandardToolbarService stdToolbar = StiStandardToolbarService.GetService() anywhere
-
- Posts: 6197
- Joined: Tue Mar 20, 2018 5:34 am
- poweredbyporkers
- Posts: 28
- Joined: Fri Nov 29, 2013 8:42 pm
Re: Adding button to toolbar v2015.3
Thanks for that although I went in a different direction but now I'm having an issue getting the tooltip i the same format as the existing buttons
Code: Select all
private void AddExportButton()
{
var exportButton = new ButtonItem
{
Text = "Export...",
Name = "exportButton",
BeginGroup = true
};
exportButton.Shortcuts.Add(eShortcut.CtrlE);
exportButton.Click += (s,e) =>
{
using (var exportDialog = new ReportExportDialog())
{
exportDialog.StartPosition = FormStartPosition.CenterParent;
exportDialog.ShowDialog();
}
};
viewerControl.ToolBar.Items.Insert(1, exportButton);
}
- Attachments
-
- new.png (4.6 KiB) Viewed 1487 times
Re: Adding button to toolbar v2015.3
Hi Poweredbyporkers,
In our older versions the following technique did work;
viewtopic.php?f=8&t=3165&p=13175
Could you please try a similar approach?
Thank you,
Edward
In our older versions the following technique did work;
viewtopic.php?f=8&t=3165&p=13175
Could you please try a similar approach?
Thank you,
Edward