Page 1 of 1

Customise Designer - help please

Posted: Thu Feb 08, 2007 8:36 pm
by jing
1) Can I add a menu item to an existing menu on the report designer? (Say, adding a menu item called "Choose Default Printer" under the existing Tools menu, so that the user can click on it and a custom form will popup providing a list of printers and it's settings etc)

2) Can I actually fully customise the designer (ie drag in tool bars, panels, controls and components) onto a windows form? If this can be done, can you provide me with some examples please?

thank you very much

Customise Designer - help please

Posted: Fri Feb 09, 2007 12:21 pm
by Vital
1) Can I add a menu item to an existing menu on the report designer? (Say, adding a menu item called "Choose Default Printer" under the existing Tools menu, so that the user can click on it and a custom form will popup providing a list of printers and it's settings etc)
You can't add new menu items to main menu.
2) Can I actually fully customise the designer (ie drag in tool bars, panels, controls and components) onto a windows form? If this can be done, can you provide me with some examples please?
At this moment you can't use report designer as control. Please see sample project DesignerManagement.

Thank you.

Customise Designer - help please

Posted: Sun Feb 11, 2007 3:47 pm
by jing
Hi, Thanks for your reply.

So Can you add button to a designer's toolbar or toolbox ?
I have tried the following code, but I received a "NULL exception". But I don't understand why, as it seems every object is not null.

Code: Select all

  Dim ToolboxToolbarService As Stimulsoft.Report.Design.Toolbars.StiToolboxToolbarService = Stimulsoft.Report.Design.Toolbars.StiToolboxToolbarService.GetService
            If (Not ToolboxToolbarService Is Nothing) Then
                'Adding a button'
                Dim btnPrintSetup As New Stimulsoft.Controls.StiToolButton()
                btnPrintSetup.Size = New Size(20, 20)
                btnPrintSetup.Text = "Printer Setup"

                Dim iList As New ImageList()
                iList.Images.Add(New Drawing.Icon("c:\icon.ico"))

                btnPrintSetup.ImageList = iList
                btnPrintSetup.ImageIndex = 0

                Dim printEvent As New System.EventHandler(AddressOf PrinterSetup)
                ToolboxToolbarService.Add(btnPrintSetup, "Default Printer", printEvent)

            End If

Private Sub PrinterSetup(ByVal sender As Object, ByVal e As System.EventArgs)
        MessageBox.Show("check")

    End Sub


Any help please ...

thanks

Customise Designer - help please

Posted: Wed Feb 14, 2007 1:24 pm
by Vital
Please get build from Feb, 14 (when it will be available).
In this build please use following code:

C#:

Code: Select all

using Stimulsoft.Report.Design.Toolbars;

StiToolboxToolbarService.GetService().AddToolButton("Проверка", new EventHandler(OnButtonClick));

private void OnButtonClick(object sender, EventArgs e)
{
	MessageBox.Show("Test");
}
VB.Net:

Code: Select all

Imports StiStandardToolbarService.GetService

AddToolButton("MyButton", New EventHandler(AddressOf Me.OnButtonClick))

Private Sub OnButtonClick(ByVal sender As Object, ByVal e As EventArgs)
      MessageBox.Show("Test")
End Sub
Thank you.

Customise Designer - help please

Posted: Mon Mar 05, 2007 8:21 am
by Edward
Now the Designer in the StimulReport.Net may be used as Control. Please refer to it as StiDesignerControl. This control is in Stimulsoft.Report.dll.

This feature is available in the build from the March, 5. You can download the build in the prerelease section of our site:
http://www.stimulsoft.com/DownloadsSR.aspx

Thank you.