Italian Disabilitare customlistview

Fulvio75

Well-Known Member
Licensed User
Buongiorno a tutti, come faccio a disabilitare /abilitare una customlistview da codice?
Non esiste un CLW.Enabled = false/true.

Grazie
 

LucaMs

Expert
Licensed User
Longtime User
Vero (purtroppo).

Hai solo due possibili soluzioni:

1) disabilitare tutte le view, "scorrendo" tutti gli item da codice (eventualmente ti dirò come, se servisse)
2) sovrapporre un Panel trasparente sopra la CLV - aggiungendo nel tuo codice sorgente anche l'evento:
B4X:
' VUOTA MA NON RIMUOVERE
Sub pnlDisableCLV_Touch (Action As Int, X As Float, Y As Float)
End Sub
pannello che renderai visibile/invisibile in base alla necessità.
 
Last edited:

Fulvio75

Well-Known Member
Licensed User

ok per le view sono label quindi label.enable = false per ogni label visualizzata
altrimenti pannelo disabilitato
ok grazie
 

Sagenut

Expert
Licensed User
Longtime User
Posto una piccola correzione al codice suggerito da @LucaMs
B4X:
' VUOTA MA NON RIMUOVERE
Sub pnlDisableCLV_Touch (Action As Int, X As Float, Y As Float) as Boolean
    Return True
End Sub
Senza il Return True credo che il tocco non venga CONSUMATO dal Panel e arrivi ancora alla CLV.
Prova prima la versione proposta da @LucaMs comunque.
 

Sagenut

Expert
Licensed User
Longtime User
Deve essere stata l'ora tarda.
Chiedo venia.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…