Densyy Posted January 11, 2012 Report Share Posted January 11, 2012 Gostaria de saber como é possivel adicionar Colunas a uma ListboxDividir uma listbox em umas 3 ColunasNão faço ideia Se alguém poder ajudar ficarei muito grato Quote Link to comment Share on other sites More sharing options...
0 kuroi Posted January 11, 2012 Report Share Posted January 11, 2012 Com ListBox não dá, veja: http://scriptbrasil.com.br/forum/index.php...st&p=586672 Quote Link to comment Share on other sites More sharing options...
0 lobismano Posted January 11, 2012 Report Share Posted January 11, 2012 beleza.acho que isso pode ajudar..Dim diadasemana As VariantReDim diadasemana(1, 1)ListBox1.ColumnCount = 2diadasemana(0, 0) = "Seg"diadasemana(0, 1) = "Ter"diadasemana(1, 0) = "Qua"diadasemana(1, 1) = "Qui"ListBox1.List() = diadasemanaat. Quote Link to comment Share on other sites More sharing options...
0 Densyy Posted January 11, 2012 Author Report Share Posted January 11, 2012 (edited) Vlw ai pessoalLobismano deu certo esse ai vlw mesmoMas gostaria de poder escolher o tamanho de cada colunaSera que é possivel?Achei um metodo perfeito usando o List View Edited January 11, 2012 by Densyy Quote Link to comment Share on other sites More sharing options...
0 Densyy Posted January 11, 2012 Author Report Share Posted January 11, 2012 (edited) Aqui vai a solução pra quem estiver com esse problemaOption Explicit Private Declare Function SendMessageArray Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Const LB_SETTABSTOPS = &H192 Private Sub Command1_Click() Dim i As Integer ReDim lbtab(3) As Long 'for 3 tabs redim LBTab(1 to 3)as long lbtab(1) = 180 lbtab(2) = 250 lbtab(3) = 300 ' Set tab stops, params are Hwnd of list box, number of tabs in array, tab settings array SendMessageArray List1.hwnd, LB_SETTABSTOPS, 3, lbtab(1) ' Populate listbox with some test data - use vbtab to separate columns List1.AddItem "Nome" & vbTab & "Valor" & vbTab & "Quantidade" & vbTab & "Descrição" List1.AddItem "1" & vbTab & "2" & vbTab & "3" & vbTab & "4" List1.AddItem "1" & vbTab & "2" & vbTab & "3" & vbTab & "4" 'you can have loops here End Sub Edited January 11, 2012 by Densyy Quote Link to comment Share on other sites More sharing options...
Question
Densyy
Gostaria de saber como é possivel adicionar Colunas a uma Listbox
Dividir uma listbox em umas 3 Colunas
Não faço ideia
Se alguém poder ajudar ficarei muito grato
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.