ScrollBars in MDI Child Windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • james@nospam.com

    #1

    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.
  • Marcin GrzÄ™bski

    #2
    Re: ScrollBars in MDI Child Windows

    Hi James,

    james@nospam.co m napisał(a):[color=blue]
    > 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.[/color]

    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

    Comment

    • james@nospam.com

      #3
      Re: ScrollBars in MDI Child Windows

      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:
      [color=blue]
      > Hi James,
      >
      > james@nospam.co m napisał(a):[color=green]
      > > 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.[/color]
      >
      > 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
      >[/color]

      Comment

      • Marcin GrzÄ™bski

        #4
        Re: ScrollBars in MDI Child Windows

        james@nospam.co m napisał(a):[color=blue]
        > 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.[/color]

        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

        Comment

        • james@nospam.com

          #5
          Re: ScrollBars in MDI Child Windows

          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:
          [color=blue]
          > james@nospam.co m napisał(a):[color=green]
          > > 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.[/color]
          >
          > 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
          >[/color]

          Comment

          • Marcin GrzÄ™bski

            #6
            Re: ScrollBars in MDI Child Windows

            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.Clie ntSize to Image.Size.
            If you add this PictureBox to .Controls of Panel (with .AutoScroll=tru e)
            then all should work fine.

            Marcin

            james@nospam.co m napisał(a):[color=blue]
            > 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.[/color]

            Comment

            Working...