Page 1 of 1

Selecting page modes

Posted: Sat Jun 07, 2008 1:51 am
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?

Selecting page modes

Posted: Sun Jun 08, 2008 2:44 am
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.

Selecting page modes

Posted: Sun Jun 08, 2008 11:37 pm
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

Selecting page modes

Posted: Tue Jun 10, 2008 11:25 pm
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

Selecting page modes

Posted: Mon Jun 23, 2008 3:23 am
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.