Page 1 of 1

statusbar preview in designer

Posted: Tue Nov 30, 2021 10:18 am
by paullef
Hello

In your windows forms designer, in the preview you have a statusbar where you are showing pages, check for issues, refresh and zoom factors. How can I get the same bar. I only am able to show the pagination (StiDesignerControl1.DesignerPreviewControl.ViewerControl.ShowStatusBar = True) and/or the statusbar (StiDesignerControl1.ShowRibbonStatusBar = True), but not the combined one.

Thanks
Paul

Re: statusbar preview in designer

Posted: Tue Nov 30, 2021 6:52 pm
by Lech Kulikowski
Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more detail?

Thank you.

Re: statusbar preview in designer

Posted: Tue Nov 30, 2021 8:09 pm
by paullef
In the statusbar of your winforms editor you have a statusbar. I would like to have that statusbar integrated in my application using the (winforms) stidesignercontrol. How can I get that. Please look at the picture (pages/issues/refres/zoom factor).

Thank you

Paul
stimulsofteditor.PNG
stimulsofteditor.PNG (18.67 KiB) Viewed 11368 times

Re: statusbar preview in designer

Posted: Wed Dec 01, 2021 9:05 am
by Lech Kulikowski
Hello,

You can use the following code for the StiDesignerControl:
designer.ShowToolbarStatusBar = false;
designer.ShowRibbonStatusBar = true;

Thank you.

Re: statusbar preview in designer

Posted: Wed Dec 01, 2021 10:51 am
by paullef
Hello,

If I use:

designer.ShowToolbarStatusBar = false;
designer.ShowRibbonStatusBar = true;

I will not get the page navigation, and refresh button as you can see in the picture below

stimulsofteditor2.PNG
stimulsofteditor2.PNG (27.1 KiB) Viewed 11353 times

Thanks
Paul

Re: statusbar preview in designer

Posted: Wed Dec 01, 2021 1:01 pm
by paullef
Ok, I have found a workaround:

Code: Select all

Private Sub StiDesignerControl1_RebuildDesigner(sender As Object, e As EventArgs) Handles StiDesignerControl1.RebuildDesigner
    StiDesignerControl1.DesignerPreviewControl.ViewerControl.ShowStatusBar = True

    If DirectCast(StiDesignerControl1.Controls("bar1"), Stimulsoft.Controls.Win.DotNetBar.Bar).Items.Contains("sbpReportChecker") Then
        DirectCast(StiDesignerControl1.DesignerPreviewControl.ViewerControl.Controls("StiViewerControl").Controls("panelView").Controls("tbStatusbar"), Stimulsoft.Controls.Win.DotNetBar.Bar).Items.Add(
        DirectCast(StiDesignerControl1.Controls("bar1"), Stimulsoft.Controls.Win.DotNetBar.Bar).Items("sbpReportChecker"), 1)
    End If
End Sub

Private Sub StiDesignerControl1_RefreshDictionary(sender As Object, e As EventArgs) Handles StiDesignerControl1.RefreshDictionary
    If StiDesignerControl1.DesignerPreviewControl.Visible Then
        StiDesignerControl1.DesignerPreviewControl.DoRefresh()
    End If
End Sub
It will place the reportchecker in the statusbar of the viewer. It is probably not the cleanest way, but it works.

However, I cannot find the refresh button in the document object model of the designer. For now I fixed it by automatically refresh the report if the dictionary is changed.

Thanks
Paul

Re: statusbar preview in designer

Posted: Thu Dec 02, 2021 2:59 pm
by Lech Kulikowski
Hello Paul,

Thank you for the information.