From: "Rick Rogers (TeamB)" Subject: Re: Really BIG graphics? Date: 10 Aug 1999 00:00:00 GMT Message-ID: <7opkha$aas6@forums.borland.com> References: <37B051A9.6F5A3A9C@jacobs.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: TeamB X-MSMail-Priority: Normal Newsgroups: borland.public.delphi.graphics > How do you go about setting up such a thing, and making sure the > scrollbars work correctly? This is a common misconception. You can't make "really BIG" graphics -- Windows and/or your video drivers won't allow it. Frequently, you won't be able to make a bitmap larger than the screen. However, you really don't ever need to do so. You can fairly easily make something *appear* to be a large graphic, while in fact just drawing what is necessary onto the screen. For your example of a large Gantt chart, you will be maintainting the data to be represented in the Gantt chart somewhere, such as a database. You'll create some routines to pull the data out of the database and draw it onto a canvas. You will need to keep track of the user's position within the Gannt chart (such as current date). Then you simply draw onto the screen the relevant subset of the Gantt chart data. When the user changes their current position (for example, by scrolling), you simply redraw onto the screen the next subset of the Gantt chart data. You can set the scrollbar's Max property to an appropriately large number (such as the number of days covered by the Gantt chart), and then simply redraw the current subset onto the screen. The process that I've described -- keeping track of current position and drawing a current subset onto the screen -- is how just about every single Windows application with scrollbars works. For example, it is how windows in Microsoft Windows are painted -- only the part that is visible on the screen is painted. There isn't a giant bitmap of a window stored somewhere; Microsoft Windows requests a window to repaint itself, and tells the window what portion of it is visible on the screen. It is up to the window code to draw the relevant portion onto the screen, based on its own internal data structures (there is an exception to this rule, used for very small windows such as hint windows). This is also how list boxes, tree views, list views, Delphi's grids, etc., etc., are drawn. - Rick