PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
How to scroll large drawings/large docs?
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
How to scroll large drawings/large docs?
![]() |
How to scroll large drawings/large docs? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi,
I have a "document". My doc can be divided to thousends of lines. Every line can be displayed as a drawing, every line has an OnPaint method. How can be displayed this document??? The height of every line is 75. If each line is reperesented by separate controls the program will be very slow, because thousands of controls must be checked every time wether they are on the screen or not (?). If the whole document is reperesented by one control size limitation seems to be exceeded: the height of my "one and only" control should be more than 75000. System.Windows.Forms can not be resized (or not always can be resized) to this height. The limit is 32767. ( My very large control is on a Panel in this case. I don't know the general way to handle large docs. Please help!!! Frankie |
|
|
|
#2 |
|
Guest
Posts: n/a
|
The basic answer is 1) that's a bad design of the UI and 2) since you have a
large amount of data, you're not going to be able to have a single panel or something that will actually contain everything. You'll have to build what I might call a virtual panel, attach a scroll bar and, based on the scroll bar position you, yourself, will have to decide what pieces your control "contains" (not really, but virtually), to draw, calling then appropriately. That is, *you* take over from the window manager to figure out what's visible and to call those items and tell them where in the unscrolled area of your virtual panel to draw (nothing is ever scrolled; the scroll bar just tells you where you should look for the items to be drawn). Don't underestimate the advantages of actually rethinking your design, but it is certainly possible to do 2. Paul T. "Frankie D." <FrankieD@discussions.microsoft.com> wrote in message news:82010327-0434-4CCA-93B7-6CA020D878E4@microsoft.com... > Hi, > > I have a "document". My doc can be divided to thousends of lines. Every > line > can be displayed as a drawing, every line has an OnPaint method. How can > be > displayed this document??? The height of every line is 75. > > If each line is reperesented by separate controls the program will be very > slow, because thousands of controls must be checked every time wether they > are on the screen or not (?). > > If the whole document is reperesented by one control size limitation seems > to be exceeded: the height of my "one and only" control should be more > than > 75000. System.Windows.Forms can not be resized (or not always can be > resized) > to this height. The limit is 32767. ( My very large control is on a Panel > in > this case. > > I don't know the general way to handle large docs. Please help!!! > > Frankie > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thank you for your answer.
"Paul G. Tobey [eMVP]" wrote: > The basic answer is 1) that's a bad design of the UI and 2) since you have a > large amount of data, you're not going to be able to have a single panel or > something that will actually contain everything. You'll have to build what > I might call a virtual panel, attach a scroll bar and, based on the scroll > bar position you, yourself, will have to decide what pieces your control > "contains" (not really, but virtually), to draw, calling then appropriately. > That is, *you* take over from the window manager to figure out what's > visible and to call those items and tell them where in the unscrolled area > of your virtual panel to draw (nothing is ever scrolled; the scroll bar just > tells you where you should look for the items to be drawn). > > Don't underestimate the advantages of actually rethinking your design, but > it is certainly possible to do 2. > > Paul T. > > "Frankie D." <FrankieD@discussions.microsoft.com> wrote in message > news:82010327-0434-4CCA-93B7-6CA020D878E4@microsoft.com... > > Hi, > > > > I have a "document". My doc can be divided to thousends of lines. Every > > line > > can be displayed as a drawing, every line has an OnPaint method. How can > > be > > displayed this document??? The height of every line is 75. > > > > If each line is reperesented by separate controls the program will be very > > slow, because thousands of controls must be checked every time wether they > > are on the screen or not (?). > > > > If the whole document is reperesented by one control size limitation seems > > to be exceeded: the height of my "one and only" control should be more > > than > > 75000. System.Windows.Forms can not be resized (or not always can be > > resized) > > to this height. The limit is 32767. ( My very large control is on a Panel > > in > > this case. > > > > I don't know the general way to handle large docs. Please help!!! > > > > Frankie > > > > > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

