Results 1 to 5 of 5

Thread: [RESOLVED] Controls with fixed position

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2012
    Posts
    35

    Resolved [RESOLVED] Controls with fixed position

    Hello, I have a form whichj contains a tableLayoutPanel with 2 columns, set to stretch and shrink together with the form size ( anchor set to top/left/right/bottom ). Inside the second column, I have a panel, with dock set to fill. Inside the panel, I have a progressBar positioned in the middle of the panel. The problem is that when the form size changes, the position of the progressbar changes as well. How can I make it stay in place and not adapt its position to the panel's size?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [RESOLVED] Controls with fixed position

    If you don't want the ProgressBar to move with the panel then why did you add it to the Panel in the first place? If you want the ProgressBar to be positioned relative to the form then add it to the form.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2012
    Posts
    35

    Re: [RESOLVED] Controls with fixed position

    I want it to be in front of the panel

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [RESOLVED] Controls with fixed position

    So put it in front of the Panel. There's no problem having multiple controls with the same Parent overlapping. You can adjust the z-order to have whichever you want in front and behind. You might want to make use of the Document Outline window to see and modify a hierarchical view of the controls on a form.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2012
    Posts
    35

    Re: [RESOLVED] Controls with fixed position

    Well, I fixed it. Thanks

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