Resizing and scrolling

Hi!

This might sound stupid but I can’t figure out how to handle adding the ability to scroll when a window is resized. Here’s the scenario:

I have a window with a Canvas on it. I have buttons that when clicked will embed ContainerControls into the canvas. Each button click clears the ContainerControl that was already there then adds the one that was requested.

Each one of these ContainerControls contains a set of controls; Buttons, TextFields, PopupMenus, ListBoxes, etc. that comprise a form. There are multiple forms, each one on a different ContainerControl.

When I resize the window, the controls will go out of view and I can’t figure out a way to scroll in order to make them visible.

This especially has implications given that we’re building a cross-platform app and our Mac tester can barely see all the controls on screen by default.

Can anyone help?

[quote=167473:@Dave Greene]Hi!

This might sound stupid but I can’t figure out how to handle adding the ability to scroll when a window is resized. Here’s the scenario:

I have a window with a Canvas on it. I have buttons that when clicked will embed ContainerControls into the canvas. Each button click clears the ContainerControl that was already there then adds the one that was requested.

Each one of these ContainerControls contains a set of controls; Buttons, TextFields, PopupMenus, ListBoxes, etc. that comprise a form. There are multiple forms, each one on a different ContainerControl.

When I resize the window, the controls will go out of view and I can’t figure out a way to scroll in order to make them visible.

This especially has implications given that we’re building a cross-platform app and our Mac tester can barely see all the controls on screen by default.
[/quote]

Instead of placing your controls on the window, lay a canvas as background, place the controls on it, then use the canvas MouseWheel event to scroll the canvas with the Delta values.