| To: | REALbasic NUG Italian <realbasic-nug.it@lists.realsoftware.com> |
|---|---|
| Subject: | Re: Listbox colorazione riga subordinata a contenuto cella |
| From: | "Ing. Antonio Rinaldi" <falcosoft@mac.com> |
| Date: | Tue, 16 Jun 2009 09:27:01 +0200 |
| Authentication-results: | mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug.it-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug.it-bounces@lists.realsoftware.com |
| Delivered-to: | listarchive@realsoftware.com |
| In-reply-to: | <26d1d61d0906160005g5bb14543lcd237730624eb81b@mail.gmail.com> |
| Reply-to: | REALbasic NUG Italian <realbasic-nug.it@lists.realsoftware.com> |
| Sender: | realbasic-nug.it-bounces@lists.realsoftware.com |
| Thread-index: | AcnuU9bJFXQdRVpHEd6g/gAUUWTEZQ== |
| Thread-topic: | Listbox colorazione riga subordinata a contenuto cella |
| User-agent: | Microsoft-Entourage/11.4.0.080122 |
Non potrebbe voler dire che basta solo questa parte del codice?
If Listbox1.cell(row,1)="Pippo" then
g.foreColor=...
g.fillRect....
End if
L'evento e CELLbackgroundPaint ovvero è il background della cella di
coordinate Row e Column, e non di tutta la listbox
Il giorno 16-06-2009 9:05, Massimo Lista, massimo.lista@gmail.com ha
scritto:
> Per colorare una riga subordinata al valore contenuto in una cella avevo
> scritto:Su Evento: CellBackgroundPaint
>
> Dim i, TotRow, res As Integer
> Dim numriga As integer
> TotRow=me.ListCount
> for i=0 to TotRow -1
> If ListBox1.Cell(i,1) = "Pippo" then
> g.ForeColor=RGB(255,176,98) //Arancio
> g.FillRect(0,0,g.Width,g.Height)
> end if
> next
> ...ma non funzionava (vengono colorate tutte le righe pur intercettando l'if
>
>
> Per farlo funzionare ho dovuto aggiungere if row =...
> Dim i, TotRow, res As Integer
> Dim numriga As integer
> TotRow=me.ListCount
> for i=0 to TotRow -1
> If ListBox1.Cell(i,1) = "Pippo" then
> numriga = i
> if row = numriga then
> g.ForeColor=RGB(255,176,98) //Arancio
> g.FillRect(0,0,g.Width,g.Height)
> end if
> end if
> next
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Listbox colorazione riga subordinata a contenuto cella, Massimo Lista |
|---|---|
| Next by Date: | Re: Listbox colorazione riga subordinata a contenuto cella, Massimo Lista |
| Previous by Thread: | Listbox colorazione riga subordinata a contenuto cella, Massimo Lista |
| Next by Thread: | Re: Listbox colorazione riga subordinata a contenuto cella, Massimo Lista |
| Indexes: | [Date] [Thread] [Top] [All Lists] |