Virtual Scrollbox

 
  home
     

Projects

Products

Coding Corner
  Components
  Tips

Contact Us

Design Background

Curriculum Vitae

Forum

Links

 

 

Virtual scrollbox component
Added: 13Oct2003

This component implements a Delphi "TCustomControl" descendant that automatically implements scrollbars. You can set the virtual size of the control, and the left and top position of the visible area. Override the paint method to paint a part of the virtual area.

It can be used as a base for document imaging components, CAD components, GIS components, etectera; any component that needs a scrollable area in order to show the whole document, but where you do not want to provide the complete non-visual area as a bitmap image.

Registered users will get:

VirtualScrollbox.pas This file contains the complete TVirtScrollbox functionality. Just include it in your project folder, and add "VirtualScrollbox" to your "uses" clause. It compiles correctly under Delphi 5, Delphi 6 and Delphi 7.

Have a look at the interface section.

readme.txt Information about the package.

DemoMain.pas
DemoMain.dfm

These files implement a demo application that demonstrates how to override TVirtScrollbox to create your own components.

It shows how to create a virtual area and now to respond to paint messages, in this case by drawing 16x16 rectangles in random colors.

Full source included in the examples!

Why use TVirtScrollbox?

  • It will save you the hassle with combinations of TImage, TPaintbox, TScrollbox and/or panels on your form. TVirtScrollbox is one control that implements scrolling, that can be a basis for your components.

  • Scrollbars cannot safely handle integer numbers larger than 32767 on all Windows versions. TVirtScrollbox provides a workaround and hides underlying shortcomings in a safe way.

  • You need not redraw the total window as a result of a scrollbar position
    change. Windows will automatically copy most part of the window, and will
    provide the Cliprect as "update strip" which you can then draw in your component code. The demo shows how. This approach results in very efficient drawing.

  • TVirtScrollBox can handle any size of "virtual" drawing size and will
    provide the appropriate methods you can override to do your drawing etc.

  • TVirtScrollbox is also completely flicker free by nature (even without setting DoubleBuffered := True).

Registration

You can register this software at the cost of US$19,95 through our website. When you register you will get:

  • Full source code (you'll receive VirtualScrollbox.pas);

  • Full rights to use VirtualScrollbox in your software (one developer license).

If you want to register then please use our secure order form at Regsoft. As soon as your order is processed, you will get a link to the source, where you can immediately download it. It includes the files stated above, and the license allows unlimited use in your software.

Click here for the nonsecure order form if you have problems with above link.

Screenshot

This is a screenshot of the demo application:


You can view the source of this demo or download the executable.

Related Links

DtpDocument component
This component implements a complete Desktop Publishing component. Use it to allow your users to create multipage documents. Supports alpha-blending, free rotation, and all kinds of shapes.

 

   Page last changed: 13Nov2009 © Copyright 2002-2009 SimDesign