Hey all, I have an application that displays an image in a scrolled
window with some control widgets underneath. I allow the user to zoom
the image in up to 100% of its original size, which is generally the
same dimensions as the screen it will be displayed on. I'd like to
make it so that when the user zooms the image and it becomes larger
than the screen, the whole frame with the scrolled window and widgets
gets resized to fit inside the screen. i.e. I don't want scroll bars
to ever appear on the container frame. I'm not even sure where to
start, any suggestions on a strategy to implement this?
I'm not sure I understand what you are asking for. Do you simply want to limit the zoom such that everything fits on screen? If so then you can use the client size of the window where you are drawing the image as the limit. If you don't want scrollbars then why use a scrolled window?
···
On 5/13/11 10:20 AM, PRobbins wrote:
Hey all, I have an application that displays an image in a scrolled
window with some control widgets underneath. I allow the user to zoom
the image in up to 100% of its original size, which is generally the
same dimensions as the screen it will be displayed on. I'd like to
make it so that when the user zooms the image and it becomes larger
than the screen, the whole frame with the scrolled window and widgets
gets resized to fit inside the screen. i.e. I don't want scroll bars
to ever appear on the container frame. I'm not even sure where to
start, any suggestions on a strategy to implement this?
--
Robin Dunn
Software Craftsman