Dock and width

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created an application where I use docking of my controls to the top
or bottom extensively. It works great, but when my app is used on rugged
devices, who usually steal a few pixels around the entire screen with their
bezels, the scroll bars of listboxes or trees end up being very hard to use.

Is there a way to have the docking width not out to the complete outer edge?
Is there a way to adjust the size of a control's scroll bar?

I am not excited about the idea of resizing all my forms and was looking for
ideas from people who may have dealt with it.
 
Juan - You might try placing a Panel control on each form, sizing it
slightly smaller than the full screen size, and placing all of the "real"
controls inside the Panel control. They'll dock to their immediate parent
container, the Panel, instead of the entire form.

Jeff Hopper
Hopper Consulting, Inc.
 
To add to Jeff's idea, you may want to place Panel control on either
edges of the screen with a fixed width to compensate for the covered
area. Dock them to left and right edges, respectively, then add
another Panel in Fill Dock mode in the center. Make sure you set the
AutoScroll property to true for the center Panel and place all your
controls there. It should work as you need.

Be sure to set the proper z-order of these Panels in order to get the
desired effect. You can do that using the "Bring to front" and "Send
to back" options by right-clicking the mouse button.
 
Good additional ideas...in order to make z-order placement easy, you might
find the Document Outline pane (View | Other Windows | Document Outline)
useful. It's not a terribly well-known tool, but helps visually place
controls in the desired z-order, which can be difficult with the form
designer alone.

Jeff
 
Thanks for the tip on the Document Outline Pane. I wasn't aware of it
and had situations in the past where it would have helped.

Jin
 
Back
Top