PDA

View Full Version : Dynamically sizing <canvas>


johncorro
10-18-2004, 09:29 AM
Is there any way I can do make the <canvas> width attribute equal the size of the browser? Something along the lines of <canvas width="*"/>. I'd like my Laszlo app to grow or shrink based on the size of the browser (as opposed to be a fixed width/height), but maintain the normal font/window/button/etc size.

The closest thing I've found was to modify the width and height attribute of the <object> and <embed> tags to "100%". The flash file grows and shrinks to the size of the browser, but the problem is that the font/button/window/etc size will also grow/shrink. So for instance, instead of increasing/decreasing the size between two components to accommodate the resizing, it'll just increase/decrease the size of the actual components themselves.