Re: scrolling a user control

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Herfried K. Wagner [MVP] (hirf-spam-me-here_at_gmx.at)
Date: 10/15/04


Date: Fri, 15 Oct 2004 23:23:36 +0200


"Steve Bugden" <SteveBugden@discussions.microsoft.com> schrieb:
> I have created a user control which I then add standard controls to
> prgramatically i.e. picture box, text box etc.
>
> I'm just wondering if it is possible to scroll to given position in the
> scrollable region? So lets say the control has a height of 300 pixels and
the
> scrollable height is 1000 pixels then I'd like to be able to just make
pixel
> 500 appear in the top left of the controls visible area.
>
> If this isn't possible what alternatives are there for scrolling a user
> control programatically.

Take a look at the control's 'AutoScrollPosition' property.

-- 
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


Relevant Pages

  • Re: Make a user control floatable?
    ... You have to get the position relative to the top of the window. ... I have a user control which I use on all my pages. ... For some long pages the user has to scroll back up to the top of the page ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Need to use VBA to put image on a form
    ... Earl Kiosterud ... the OP can place an Image control, ... this way the form's native ScrollBars can be used to scroll the contents of the Image ... Note: Some folks prefer bottom-posting. ...
    (microsoft.public.access.formscoding)
  • Re: How do you interactively write to a CEditView Window
    ... When you scroll the ... the window flashes a lot. ... and trying to control the flashing and deal with the user resetting ... note that sizeof() a string will include the NUL character, while what you really want is ...
    (microsoft.public.vc.mfc)
  • Re: Cannot enter edit boxes on CProperty pages
    ... Are you trying to make the propretysheet scroll, ... tab control to switch pages and on a PC an OK button. ... to an edit box with mouse and edit it, nor does it seem tab keyboard ... not on WinCE device ...
    (microsoft.public.vc.mfc)
  • Re: ASP.Net 2.0 and partial classes
    ... to the Designer where he or she must select a control and scroll, scroll, ... What was the name of that control again? ... Back to the Designer to scroll, ... the partial class using commented signatures for each control. ...
    (microsoft.public.dotnet.framework.aspnet)