Jump to content
  • Advertisement
Sign in to follow this  
Daniel Miller

[.net] Trying to get scrollbars to look right.

This topic is 4859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In VS, if you dock your scrollbars to the edges of the form, the horizontal scrollbar goes all the way from the left edge of the form to the right edge. However, scrollbars are supposed to meet at a little square in the corner. Do I have to put a panel in the corner, and keep resizing everything to make it all look right, or is there an easy way out?

Share this post


Link to post
Share on other sites
Advertisement
Just do:


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Form1_Resize(Me, Nothing)
End Sub

Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize

vscr.Location = New Point(Me.ClientSize.Width - vscr.Width, 0)
vscr.Size = New Size(vscr.Width, Me.ClientSize.Height - hscr.Height)

hscr.Location = New Point(0, Me.ClientSize.Height - hscr.Height)
hscr.Size = New Size(Me.ClientSize.Width - vscr.Width, hscr.Height)

End Sub

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!