Selecting page modes

Stimulsoft Reports.NET discussion
Post Reply
satisht
Posts: 150
Joined: Mon Apr 09, 2007 12:28 am
Location: Pune

Selecting page modes

Post by satisht »

Hello Support,
I want to select the single page mode automatically when we clik on 'one page' button from preview window toolbar and multiple pages mode when we click on two pages or multiple pages button.
Also I want to remove the page modes from bottom of the preview window
How should I do that ?
Thank you?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Selecting page modes

Post by Edward »

For redefining behavior of the buttons you should hide unnecessary buttons at first. Secondly you should add new buttons using the following method:

previewForm.PreviewControl.ToolBar.Controls.Add(myButton);

Thank you.
satisht
Posts: 150
Joined: Mon Apr 09, 2007 12:28 am
Location: Pune

Selecting page modes

Post by satisht »

Hello Support,
Acutually I want to show single page only when we click on 'One page' button and multiple pages when we click on multiple pages button and also I want to remove the page mode buttons at the bottom
How should I change the behaviour of the button ? and how should I hide the page mode buttons ?
can you provide me a code ?
Thank you
satisht
Posts: 150
Joined: Mon Apr 09, 2007 12:28 am
Location: Pune

Selecting page modes

Post by satisht »

Hello Support,
Still I could not find how to redefine the behaviour of buttons and hiding the page mode buttons from report preview window.
Thank you
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Selecting page modes

Post by Vital »

Hello,

Please create new form. Place StiPreviewControl on created form. StiPreviewControl have many properties which help you hide required buttons. After then you need add new buttons for new behavior.
You can do this with following code:

Code: Select all

previewForm.PreviewControl.ToolBar.Controls.Add(myButton);
After then you can call methods for specified buttons. For example:

Code: Select all

stiPreviewControl.InvokeZoomOnePage();

Thank you.
Post Reply