Hi all,
I have a simple form with a vertically long grid that displays data. I put this grid within a groupbox, and then added a vertical scrollbar. I want the user to use this scrollbar to move up and down the vertical grid.
Currently, when the user clicks down on the scrollbar it moves the grid down, and when you click up, the grid moves up. This is not what I want.. it is working "backwards", and doesn't move enough up or down for the entire grid to show. Could I get some help, or pointed in the right direction?
This is my first attempt at using scrollbars. I am currently using this code:
I have a simple form with a vertically long grid that displays data. I put this grid within a groupbox, and then added a vertical scrollbar. I want the user to use this scrollbar to move up and down the vertical grid.
Currently, when the user clicks down on the scrollbar it moves the grid down, and when you click up, the grid moves up. This is not what I want.. it is working "backwards", and doesn't move enough up or down for the entire grid to show. Could I get some help, or pointed in the right direction?
This is my first attempt at using scrollbars. I am currently using this code:
Code:
Private Sub VScrollBar1_Scroll(ByVal sender As Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles VScrollBar1.Scroll
UltraGrid1.Top = VScrollBar1.Value
End Sub
Private Sub VScrollBar1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles VScrollBar1.ValueChanged
UltraGrid1.Top = VScrollBar1.Value
End Sub