Quantcast
Channel: Visual Basic Tips and Tricks
Viewing all articles
Browse latest Browse all 2212

creare/eliminare un array di button

$
0
0

buonasera a tutti,

ho un problema che non riesco a risolvere, ho una serie di tasti sulla sinistra del mio form che rappresentano una categoria quando premo il primo mi crea X bottoni sulla destra apparatenenti alla relativa categoria tramite un array di button in questa maniera:

For j = 0 To tabella_tasti.Rows.Count - 1
            btnArray2(j) = New System.Windows.Forms.Button
            btnArray2(j).Size = New Size(122, 77)
            btnArray2(j).Text = tabella_tasti.Rows(j)("product")
            btnArray2(j).Margin = New Padding(6, 6, 6, 6)
            btnArray2(j).TextAlign = ContentAlignment.BottomCenter
            'AGGIUNGI TASTO PRODOTTI
            FlowLayout2.Controls.Add(btnArray2(j))
            'AGGIUNGI EVENTO CLICK TASTO
            AddHandler btnArray2(j).Click, AddressOf click_tasto
Next

il problema nasce nel momento in cui premo il secondo tasto "categoria" che mi aggiunge gli altri bottoni in coda al mio flowlayoutpanel. 

come faccio a rimuovere e svuotare l'array di bottoni affinchè venga rigenerato con i nuovi tasti?



Viewing all articles
Browse latest Browse all 2212

Trending Articles


Vimeo 10.7.1 by Vimeo.com, Inc.


UPDATE SC IDOL: TWO BECOME ONE


KASAMBAHAY BILL IN THE HOUSE


Girasoles para colorear


Presence Quotes – Positive Quotes


EASY COME, EASY GO


Love with Heart Breaking Quotes


Re:Mutton Pies (lleechef)


Ka longiing longsem kaba skhem bad kaba khlain ka pynlong kein ia ka...


Vimeo 10.7.0 by Vimeo.com, Inc.


FORECLOSURE OF REAL ESTATE MORTGAGE


FORTUITOUS EVENT


Pokemon para colorear


Sapos para colorear


Smile Quotes


Letting Go Quotes


Love Song lyrics that marks your Heart


RE: Mutton Pies (frankie241)


Hato lada ym dei namar ka jingpyrshah jong U JJM Nichols Roy (Bah Joy) ngin...


Long Distance Relationship Tagalog Love Quotes