Mostrando las entradas con la etiqueta ListBox. Mostrar todas las entradas
Mostrando las entradas con la etiqueta ListBox. Mostrar todas las entradas

viernes, 7 de junio de 2019

seleccionar item automaticamente



listbox.SetSelected(1,True)


fuente

ToolTip listbox

Private Sub lb_dte_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lb_dte.MouseMove


        Dim i As Integer = lb_dte.IndexFromPoint(e.Location)

        If i > -1 Then
            Dim tip As String = lb_dte.Items(i).ToString

            'Dim tipw As ToolTip = Nothing

            If tip = 33 Then
                tip = "Factura electrónica"
            ElseIf tip = 34 Then
                tip = "Factura exenta"
            ElseIf tip = 39 Then
                tip = "Boleta electrónica"
            ElseIf tip = 41 Then
                tip = "Boleta exenta"
            ElseIf tip = 43 Then
            ElseIf tip = 46 Then

            End If

            If (ToolTip1.GetToolTip(lb_dte) IsNot tip) Then
                ToolTip1.SetToolTip(lb_dte, tip)
            End If
        End If
    End Sub

jueves, 6 de junio de 2019

ordenar listbox

Dim arr() As Integer = New Integer(lb_dte_activo.Items.Count - 1) {}
            Dim i As Integer = 0

            For Each elem In lb_dte_activo.Items
                arr(i) = elem
                i += 1
            Next
            Array.Sort(arr)
            'lb_dte_activo.Sorted = False
            lb_dte_activo.Items.Clear()
            lb_dte_activo.Items.AddRange(arr.Cast(Of Object).ToArray())

fuente

lunes, 29 de octubre de 2018

miércoles, 11 de julio de 2018

No update ListBox al desplegar ComboBox

Private Sub lbtablas_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbtablas.Leave
        ListBox.Update()
    End Sub

fuente