This is a migrated thread and some comments may be shown as answers.

PageViewPage autoscroll issue when WinForm maximums

2 Answers 123 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Joy
Top achievements
Rank 1
Joy asked on 22 Dec 2014, 07:06 PM
All –

I’m using PageView with the PageViewPage AutoScroll set to “true”. I also have the PageView dock set to “Fill”. So when the form maximums so should the entire PageView.

However, when the PageViewPage as a scroll-bar and you scroll all the way down before maximizing
the form the scroll-bar still appears on the form at its original position. The expected result is to disappear as the content below is now visible.

Please see screenshot attached.

Can someone please help me resolve this?

Thank You

2 Answers, 1 is accepted

Sort by
0
Joy
Top achievements
Rank 1
answered on 23 Dec 2014, 05:51 PM
All-

I was able to found a solution to this issue. On form maximizing event check I’m able to set the PageViewPage AutoScrollPosition to the PageView AutoScrollPosition which removes the scroll-bar painted in the background.

Please code snippet below:

protected override void WndProc(ref Message m)
{
    if (m.Msg == 0x0112) // WM_SYSCOMMAND
    {
        // Check your window state here
        if (m.WParam == new IntPtr(0xF030)) // Maximize event - SC_MAXIMIZE from Winuser.h
        {
            // THe window is being maximized
            this.c_pageView.SelectedPage.AutoScrollPosition = this.c_pageView.AutoScrollPosition;
        }
    }
 
    base.WndProc(ref m);
}
0
Dimitar
Telerik team
answered on 24 Dec 2014, 01:45 PM
Hi Joy,

Thank you for writing.

Yes, it is considered an issue and I have logged it in our Feedback Portal. You can track the item for status changes and add your vote for it here.
 
Your Telerik Points have been updated for this report.

Should you have any other questions do not hesitate to ask.


Regards,
Dimitar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
PageView
Asked by
Joy
Top achievements
Rank 1
Answers by
Joy
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or