Advertisement Jump to content
Sign in to follow this  
Daniel Miller

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

This topic is 4930 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!