ScrollBars in MDI Child Windows

G

Guest

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.
 
G

Guest

Hi James,

(e-mail address removed) 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
 
G

Guest

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.
 
G

Guest

(e-mail address removed) 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
 
G

Guest

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.
 
G

Guest

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

(e-mail address removed) napisał(a):
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top