views:

239

answers:

2

I am using a Panel's paint event to display a really long diagram. I've run into the problem of .net controls size (height and width) are silently limited to a signed 16 bit integer (32,767). I'm assuming this is an underlying win32 limitation.

Is there a way to get around this limitation and have larger controls?

+1  A: 

You can try to have your own scrollbars(rather than a scrolled panel), and then draw only the part of the diagram which is visible.

luiscubal
A: 

Consider rendering a thumbnail view the length of your form (one screen), with a view rectangle indicating where you are. Then just full-size render the part they scroll to.

Assuming you already have code that renders the whole DNA sequence, you might not even have to change much; the Bitmap class has a Clone() method that appears to let you clone just a rectangular section of the Bitmap, and it also has a GetThumbnailImage() method you can use to create your thumbnail.

Kyralessa