471,605 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

ScrollBars in MDI Child Windows

How can I control the placement of scrollbars in mdi child windows? I need
to place a control at the top of my child form and this control needs to
always be visible. The rest of the page needs to scroll. However the
default behavior has the control scroll with the rest of the page. Even a
toolstrip demonstrates this same behavior. Any ideas.
Jan 9 '06 #1
5 3344
Hi James,

ja***@nospam.com napisał(a):
How can I control the placement of scrollbars in mdi child windows? I need
to place a control at the top of my child form and this control needs to
always be visible. The rest of the page needs to scroll. However the
default behavior has the control scroll with the rest of the page. Even a
toolstrip demonstrates this same behavior. Any ideas.


I'll need to plece "top control" on the form, an then
place a Panel control with .Dock set to "Fill" and
..AutoScroll set to "true".
This Panel will be like a page with scroll ability.

with regards
Marcin
Jan 9 '06 #2
OK, I understand the concept. However, setting the panel AutoScroll to true
does not produce scrollbars for the panel no matter how I size the form.

"Marcin Grzębski" wrote:
Hi James,

ja***@nospam.com napisał(a):
How can I control the placement of scrollbars in mdi child windows? I need
to place a control at the top of my child form and this control needs to
always be visible. The rest of the page needs to scroll. However the
default behavior has the control scroll with the rest of the page. Even a
toolstrip demonstrates this same behavior. Any ideas.


I'll need to plece "top control" on the form, an then
place a Panel control with .Dock set to "Fill" and
..AutoScroll set to "true".
This Panel will be like a page with scroll ability.

with regards
Marcin

Jan 9 '06 #3
ja***@nospam.com napisał(a):
OK, I understand the concept. However, setting the panel AutoScroll to true
does not produce scrollbars for the panel no matter how I size the form.


That's true.
But the question is: What do you want to scroll?
Panel is the empty container, so it shold be filled by controls,
eg. single PictureBox with .Dock=None and .ClientSize equal to
its image .Size. Even if you place on this panel an empty panel
without docking then you will get scrolls on the first one.

Marcin
Jan 10 '06 #4
I really want to have a window that I can draw on. The window will not have
any other controlls. The size of the window will correspond to the page size
used when printing the drawing.

"Marcin Grzębski" wrote:
ja***@nospam.com napisał(a):
OK, I understand the concept. However, setting the panel AutoScroll to true
does not produce scrollbars for the panel no matter how I size the form.


That's true.
But the question is: What do you want to scroll?
Panel is the empty container, so it shold be filled by controls,
eg. single PictureBox with .Dock=None and .ClientSize equal to
its image .Size. Even if you place on this panel an empty panel
without docking then you will get scrolls on the first one.

Marcin

Jan 10 '06 #5
Ok.
Then i can recommend to do all the drawing on the Bitmap or Metafile
object. It will be better solution than making the drawing directly
on Control. If you will know the size of the drawing in pixels or
its relative size, then you set that Image as an .Image of PictureBox
and then set PictureBox.ClientSize to Image.Size.
If you add this PictureBox to .Controls of Panel (with .AutoScroll=true)
then all should work fine.

Marcin

ja***@nospam.com napisał(a):
I really want to have a window that I can draw on. The window will not have
any other controlls. The size of the window will correspond to the page size
used when printing the drawing.

Jan 10 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

24 posts views Thread by Nobody | last post: by
5 posts views Thread by Dennis M. Marks | last post: by
2 posts views Thread by felix | last post: by
3 posts views Thread by MrNobody | last post: by
17 posts views Thread by Dino M. Buljubasic | last post: by
4 posts views Thread by scorpion53061 | last post: by
5 posts views Thread by Christopher Kurtis Koeber | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.