Page 1 of 1

Adding toolbar buttons - cannot control position

Posted: Thu Apr 09, 2009 4:57 pm
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.

Adding toolbar buttons - cannot control position

Posted: Mon Apr 13, 2009 12:38 am
by Jan
Hello Mark,

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

Thank you.

Adding toolbar buttons - cannot control position

Posted: Tue Apr 14, 2009 9:36 am
by Mark Smith
Hi Jan -

Many thanks!

Adding toolbar buttons - cannot control position

Posted: Wed Apr 22, 2009 10:01 am
by Jan
Hello Mark,

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

Thank you.