Results 1 to 2 of 2

Thread: scrollbars on a form

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    Dover, NH
    Posts
    54

    Post

    Afternoon all. This is a question that's been tugging at me for a bit. I want to have a scrollbar on a form/window, such that if a user resizes the form to the point where some of the controls are no longer displayed, the scroll bar appears. Same goes for if the users screen is too small to display all of the controls. The way I have been shown to do this in the past is to make a sort of view port using the picture box container to hold all of the controls. You then keep track of the form size compared with the picture box. If it is smaller, the scroll bar appears and you scroll the picture box - therefore simulating being able to scroll within a form.

    With that long winded explanation out of the way - is there a better way to do this? It seems awfully cumbersome.

  2. #2
    Addicted Member
    Join Date
    May 1999
    Location
    Californ-I- A
    Posts
    207

    Post

    I think that using a picture box would be a lot less cumbersome than any other way actyually, so that in the scrollbars scroll event you can move that entire picturebox, hence the scrolling actions, instead of moving each control individually.

    Also, each control would still be in the same position, being that their reference is to the top left of the picturebox.

    ------------------
    Micah Carrick
    Ordinary joe, only not named joe.
    http://micah.carrick.com
    [email protected]
    ICQ: 53480225



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width