Adding toolbar buttons - cannot control position

Stimulsoft Reports.NET discussion
Post Reply
Mark Smith
Posts: 37
Joined: Tue Jun 13, 2006 8:59 am
Location: Yorkshire, UK

Adding toolbar buttons - cannot control position

Post by Mark Smith »

I need to add my own Open Report and New Report handlers.

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);
   }
}
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.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Adding toolbar buttons - cannot control position

Post by Jan »

Hello Mark,

We will adds required method shortly. I will inform you about progress in this topic.

Thank you.
Mark Smith
Posts: 37
Joined: Tue Jun 13, 2006 8:59 am
Location: Yorkshire, UK

Adding toolbar buttons - cannot control position

Post by Mark Smith »

Hi Jan -

Many thanks!
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Adding toolbar buttons - cannot control position

Post by Jan »

Hello Mark,

Please check build from 27 April (when it will be available).

Thank you.
Post Reply