G
Guest
Why are controls limited to 32,767 pixels? The width and Height properties
are supposed to be 32-bit integers. I am trying to make a timeline control
that could be scalled out to a unit increment of 0.01 seconds per grid
division (each grid division is 50 pixels) and have a total timeline of 10
minutes. This means my Control must be able to be at least 3,000,000 pixels
wide.
Whats strange is that the controls were sizing properly earlier today, but
all of a sudden, for some reason I can't explain, this limitation has
suddenly been introduced.
Can somebody please help me understand this!?
I have done some browsing around, and I saw that it was a reported bug on
some websites ie:
Item #20 on these websites
http://www.jelovic.com/dotnetbugs/
I'm not sure if this is considered a bug by Microsoft - I can't find any
mention about it anywhere else.
Is there a way (preprocessor directive, or optimization setting) to force
the compiler to use 32-bit integers for these fields? I really don't
understand why it WAS working earlier if this is a "built-in" limitation of
Control.Width and Control.Height.
Just as background, my timeline controls are extending UserControl. When
the user scales (zooms) in to the control, I specify the size of the control
to be:
Timeline.Width = MAXIMUM_TIME * ( GRID_INCREMENT / ( scale * 100.0f ) ) ;
where MAXIMUM_TIME is the maximum length of the timeline in centiseconds,
GRID_INCREMENT is the distance in pixels between units, and scale is the
"zoom level" of the timeline - the lowest zoom level is 0.01.
At the lowest zoom and a timeline of 10min, this would generate a width of
3,000,000 pixels.
Any ideas on whats going on? Or how I can get around this?
are supposed to be 32-bit integers. I am trying to make a timeline control
that could be scalled out to a unit increment of 0.01 seconds per grid
division (each grid division is 50 pixels) and have a total timeline of 10
minutes. This means my Control must be able to be at least 3,000,000 pixels
wide.
Whats strange is that the controls were sizing properly earlier today, but
all of a sudden, for some reason I can't explain, this limitation has
suddenly been introduced.
Can somebody please help me understand this!?
I have done some browsing around, and I saw that it was a reported bug on
some websites ie:
Item #20 on these websites
http://www.jelovic.com/dotnetbugs/
I'm not sure if this is considered a bug by Microsoft - I can't find any
mention about it anywhere else.
Is there a way (preprocessor directive, or optimization setting) to force
the compiler to use 32-bit integers for these fields? I really don't
understand why it WAS working earlier if this is a "built-in" limitation of
Control.Width and Control.Height.
Just as background, my timeline controls are extending UserControl. When
the user scales (zooms) in to the control, I specify the size of the control
to be:
Timeline.Width = MAXIMUM_TIME * ( GRID_INCREMENT / ( scale * 100.0f ) ) ;
where MAXIMUM_TIME is the maximum length of the timeline in centiseconds,
GRID_INCREMENT is the distance in pixels between units, and scale is the
"zoom level" of the timeline - the lowest zoom level is 0.01.
At the lowest zoom and a timeline of 10min, this would generate a width of
3,000,000 pixels.
Any ideas on whats going on? Or how I can get around this?