Re: Scrolling OwnerDrawn Controls



Read the article on understanding AutoScroll in the GDI+ FAQ.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.



"Shmarya" <shmarya@xxxxxxxxxxxxxxxx> wrote in message
news:%23F3QqxVFGHA.644@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I have an issue I've been battling with for a few weeks. I've tried to
> describe it in as much (relevant) detail as possible.
>
> I'd be grateful for any help!
>
> I have a control which has the following layout:
> - A toolbar docked to the top,
> - A content area filling the rest of the control.
>
> The content is drawn into the content area during OnPaint().
>
> The content may be very large, and should be scrollable.
> The size of the content is not known until after it has been drawn.
>
> In essence, the control is similar to a read-only text-editor, it should
> display an unlimited amount of scrollable information.
>
> I have tried the following solutions. Results in []:
> - Implementing scrolling using ScrollBar controls [Slow painting,
> impossible to predict when scrollbars would overlap data on edges]
> - Paint into a panel which has autoscrolling enabled [Maximum height/width
> of panel is 16bit value, not large enough].
> - Paint onto a 'buffer' image (resized as needed) and then onto the
> control surface using offsets from ScrollBar controls as needed
> [System.Drawing.Bitmap seems to have a maximum size too...]
>
> I am quite thoroughly stuck at this point, and would welcome suggestions.
>
> Have I overlooked something basic? Is there an established pattern for
> implementing this?
>
> Thanks,
> Shmarya
>
> (Please CC shmarya DOT rubenstein AT gmail DOT com when replying)
> ---------
> http://shmarya.net
>


.



Relevant Pages

  • RE: listview vertical scrollbar width
    ... ListView control encapsulates Windows build-in List-View to leverage its ... Windows has two kinds of scroll bars. ... You may use Spy++ to view ListView control structure and its windows style ... considered the non-client area of ListView, so this WS_VSCROLL scrollbar is ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • RE: listview vertical scrollbar width
    ... ListView control encapsulates Windows build-in List-View to leverage its ... Windows has two kinds of scroll bars. ... You may use Spy++ to view ListView control structure and its windows style ... considered the non-client area of ListView, so this WS_VSCROLL scrollbar is ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Transparent Picturebox
    ... You can't do this with PictureBox. ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... other control underneath it can show through, ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Zoom effect on winforms
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Answer those GDI+ questions with the GDI+ FAQ ... I have a custom control which i want it to draw ina rectangle a picture ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: TScrollBar using Int64 values?
    ... but this makes calls the Win32 API and only passes 32 ... I think this is Windows' limitation. ... Do you need an actual scrollbar control or scrollbars for some window control with scrolling? ...
    (borland.public.delphi.thirdpartytools.general)

Loading