none
SCROLLBAR APARECER SIEMPRE EN DATAGRIDVIEW CUANDO EL DATAGRIDVIEW NO TIENE REGISTROS RRS feed

  • General discussion

  • Buenos dias a todos.

    Como llamo a esta clase desde mi formulario principal que es donde tengo el DataGridView es para que me muestre siempre el scrollbar

    GRACIAS DE NUEVO A TODOS LOS QUE ME AYUDÁIS, SOY PRINCIPIANTE EN VB.NET Y HE EMPEZADO A TRABAJAR HACE POCO TIEMPO

         

    Public Class Prueba
      

        Inherits DataGrid


        Public Sub New()
            ' make scrollbar visible & add handler
            'VertScrollBar.Visible = True
            AddHandler VertScrollBar.VisibleChanged, AddressOf ShowScrollBars
        End Sub

        Private ReadOnly CAPTIONHEIGHT As Integer = 21
        Private ReadOnly BORDERWIDTH As Integer = 2

        Public Sub ShowScrollBars(ByVal sender As Object, ByVal e As EventArgs)
            If Not VertScrollBar.Visible Then
                Dim width As Integer = VertScrollBar.Width
                VertScrollBar.Location = New Point(sender.Width - width - BORDERWIDTH, CAPTIONHEIGHT)
                VertScrollBar.Size = New Size(width, sender.Height - CAPTIONHEIGHT - BORDERWIDTH)
                VertScrollBar.Show()
            End If
        End Sub

    End Class

    • Moved by Bob Wu-MT Thursday, March 7, 2013 11:41 PM
    Thursday, March 7, 2013 7:54 AM

All replies

  • Hi Largoooooo,

    This forum doesn't support any other language except English.

    You can either post in a Spanish Forum or transfer your question in English in a new thread.

    Thank you for your understanding.

    Best Regards,


    Bob Wu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 7, 2013 11:40 PM