In my project , I draw flow charts using TImage component which is inside a
ScrollBox component.
At design time, I set ScrollBox1.VertScrollBar.Range as 10000.
At runtime I increase the vertical horizontal bar's range (ScrollBox) based
on a query. When I increase the range, it will also increase the height of
Image box.( Image's Align property = alClient). Then I draw images using
canvas. This worked fine with Delphi 5.
Recently I bought Delphi 7 and there I had a problem. Whenever I go beyond
range 5000, there is a error message 'EOutOfResources The parameter is
incorrect'.
Does anybody know what is the problem ?
ScrollBox1.VertScrollBar.Range := 0;
ScrollBox1.VertScrollBar.Range := gcount*(70);
--
Cheers,
Kalyan
Your display driver probably. When you try to create bitmaps that are
significantly larger than the screen you are at the mercy of Windows and the
display driver, they may or may not support the size you need.
Anyway, using an image here is a horribly inefficient way (memory-wise) to
solve your problem. Use a TPaintbox and paint the flowcharts elements in the
paintboxes OnPaint event. Or (even better), make the elements into components
(TGraphicControl descendents) that know how to draw themselves. The Delphi
Magazine ( http://www.thedelphimagazine.com ) had an article series about how
to make such components some years back, search the article index for
"diagramming" as keyword.
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be