ListBox and Button Control Set

Hello, i have a Listbox with items, and i was trying to make that for each item, add a new Button in the control set, with the text of this item, put it in the “Caption” of the Button. I know how add a Button Dim b as new generalDemo.BevelButton8 b.PanelIndex = generalDemo.BevelButton8(0).PanelIndex But i don’t know how multipicates this action for all the items there. I was trying adding “* Listbox.ListCount” It But doesn’t work. Thanks in advance.

[quote=203336:@Federico José D’Andrea]Hello, i have a Listbox with items, and i was trying to make that for each item, add a new Button in the control set, with the text of this item, put it in the “Caption” of the Button. I know how add a Button Dim b as new generalDemo.BevelButton8 b.PanelIndex = generalDemo.BevelButton8(0).PanelIndex But i don’t know how multipicates this action for all the items there. I was trying adding “* Listbox.ListCount” It But doesn’t work. Thanks in advance.[/quote]

for i as integer = 0 to listbox1.ListCount-1 dim b as new BevelButton8 b.top = BevelButton8(0).Top+(BevelButton8(0).Height*i) bevelbutton(b).Caption = ListBox1.cell(i,0) next

[quote=203350:@Michel Bujardet] for i as integer = 0 to listbox1.ListCount-1 dim b as new BevelButton8 b.top = BevelButton8(0).Top+(BevelButton8(0).Height*i) bevelbutton(b).Caption = ListBox1.cell(i,0) next[/quote]
Thanks a lot! It’s works