Location of ThumbsPanel and PageNavigation
Location of ThumbsPanel and PageNavigation
Hello,
is it possible to change the Location of ThumbsPanel and PageNavigation in ReportViewer? I would like to show PageNavigation at top and ThumbsPanel on the left side of ReportViewer.
Thanks and kind regards
Thorsten Pontow
is it possible to change the Location of ThumbsPanel and PageNavigation in ReportViewer? I would like to show PageNavigation at top and ThumbsPanel on the left side of ReportViewer.
Thanks and kind regards
Thorsten Pontow
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: Location of ThumbsPanel and PageNavigation
And of course the FindBar!
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: Location of ThumbsPanel and PageNavigation
Hello,
For change the location of PageNavigation and FindBar you can use the following code:
But change the location of ThumbsPanel is difficult. It is not enough to set a dock style. Also need change the location for splitter which changes the size of component and change the size of panel. For this task is needed add the specific method for any changes or make it from source code, if you have it.
Thank you.
For change the location of PageNavigation and FindBar you can use the following code:
Code: Select all
this.viewerControl.StatusBar.Dock = DockStyle.Top;
this.viewerControl.FindBar.Dock = DockStyle.Top;
Thank you.
Re: Location of ThumbsPanel and PageNavigation
Hello Aleksey,
thanks for your help. FindBar works for me with your code. ThumbsPanel i will try next week.
Thank you
Thorsten Pontow
thanks for your help. FindBar works for me with your code. ThumbsPanel i will try next week.
Thank you
Thorsten Pontow
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: Location of ThumbsPanel and PageNavigation
Hello,
We are always glad to help you!
Let us know if you need any additional help.
Thank you.
We are always glad to help you!
Let us know if you need any additional help.
Thank you.
Re: Location of ThumbsPanel and PageNavigation
Is it possible to give me some more information or maybe some piece of code how to move the ThumbsPanel from right to left?
I'm a little bit lost in how to achieve this goal!
Thank you
Thorsten
I'm a little bit lost in how to achieve this goal!
Thank you
Thorsten
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: Location of ThumbsPanel and PageNavigation
Hello,
Please try to use the following code after InitializeComponent():
Thank you.
Please try to use the following code after InitializeComponent():
Code: Select all
lbThumbs.Dock = DockStyle.Left;
splThumbs.Dock = DockStyle.Left;
scrollBarThumbs.Dock = DockStyle.Left;
int index = this.panelView.Controls.IndexOf(this.scrollBarThumbs) - 1;
this.panelView.Controls.SetChildIndex(scrollBarThumbs, index);
Re: Location of ThumbsPanel and PageNavigation
Hello Aleksey,
your code works fine but i have to use reflection because lbThumbs, splThumbs and scrollBarThumbs are all private / internal. But that is ok form me now. At least i have the thumbnail panel on the left side.
I post my code here so that other developer can use it if they have to:
base.ViewerControl is the instance of StiViewerControl where i want to move the Thumbnails panel. Replace that with your own StiViewerControl instance wherever it comes from.
Thanks and kind regards
your code works fine but i have to use reflection because lbThumbs, splThumbs and scrollBarThumbs are all private / internal. But that is ok form me now. At least i have the thumbnail panel on the left side.
I post my code here so that other developer can use it if they have to:
Code: Select all
private void MoveThumbNailsLeft()
{
if (!ReferenceEquals(ThumbNailsControl, null))
{
ThumbNailsControl.Dock = DockStyle.Left;
if (!ReferenceEquals(ThumbNailsSplitter, null))
{
ThumbNailsSplitter.Dock = DockStyle.Left;
}
if (!ReferenceEquals(ThumbNailsScrollBar, null))
{
ThumbNailsScrollBar.Dock = DockStyle.Left;
}
}
}
protected VScrollBarAdv ThumbNailsScrollBar
{
get
{
Type viewerControlType = base.ViewerControl.GetType();
VScrollBarAdv thumbNailsScrollBar = null;
FieldInfo thumbNailsScrollBarField = viewerControlType.GetField("scrollBarThumbs", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
if (!ReferenceEquals(thumbNailsScrollBarField, null))
{
thumbNailsScrollBar = (VScrollBarAdv)thumbNailsScrollBarField.GetValue(base.ViewerControl);
}
return thumbNailsScrollBar;
}
}
protected StiThumbsControl ThumbNailsControl
{
get
{
Type viewerControlType = base.ViewerControl.GetType();
StiThumbsControl thumbsControl = null;
FieldInfo thumbNailsField = viewerControlType.GetField("lbThumbs", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
if (!ReferenceEquals(thumbNailsField, null))
{
thumbsControl = (StiThumbsControl)thumbNailsField.GetValue(base.ViewerControl);
}
return thumbsControl;
}
}
protected ExpandableSplitter ThumbNailsSplitter
{
get
{
Type viewerControlType = base.ViewerControl.GetType();
ExpandableSplitter thumbNailsSplitter = null;
FieldInfo thumbNailsSplitterField = viewerControlType.GetField("splThumbs", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
if (!ReferenceEquals(thumbNailsSplitterField, null))
{
thumbNailsSplitter = (ExpandableSplitter)thumbNailsSplitterField.GetValue(base.ViewerControl);
}
return thumbNailsSplitter;
}
}
Thanks and kind regards
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: Location of ThumbsPanel and PageNavigation
Hello.
Thank you for posting your solution.
Let us know if you will need any additional help.
Thank you.
Thank you for posting your solution.
Let us know if you will need any additional help.
Thank you.