Adding toolbar buttons - cannot control position
Posted: Thu Apr 09, 2009 4:57 pm
I need to add my own Open Report and New Report handlers.
In earlier versions of the library, they added to the left of the toolbar. Now they add to the right, which isn't what I want.
It used to be the case that a long time ago, I could call SendToBack on a recently added button to position it to the left of the toolbar.
If you added a version of AddToolButton that took the insertion index, that would be very helpful to me.
Code: Select all
private void MainForm_Load(object sender, EventArgs e) {
StiStandardToolbarService stdToolbar = StiStandardToolbarService.GetService();
if (stdToolbar != null) {
stdToolbar.ShowReportNew = false;
stdToolbar.ShowReportOpen = false;
stdToolbar.AddToolButton(images, 17, "Open Report..", mbiFileOpenReport_Activate);
stdToolbar.AddToolButton(images, 16, "New Report..", mbiFileNewReport_Activate);
}
}
It used to be the case that a long time ago, I could call SendToBack on a recently added button to position it to the left of the toolbar.
If you added a version of AddToolButton that took the insertion index, that would be very helpful to me.