realbasic-nug.it
[Top] [All Lists]

Re: Listbox colorazione riga subordinata a contenuto cella

To: REALbasic NUG Italian <realbasic-nug.it@lists.realsoftware.com>
Subject: Re: Listbox colorazione riga subordinata a contenuto cella
From: Massimo Lista <massimo.lista@gmail.com>
Date: Tue, 16 Jun 2009 12:03:39 +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; dkim=neutral (body hash did not verify) header.i=@gmail.com
Delivered-to: listarchive@realsoftware.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=XntUdyqXpwSNYtwpd0268qBY6f9V5UI+LlRRGFXn/0o=; b=tso2S+Nt7pTRqfvON0y4CyQdinQXtx8maBcjeDek9pm0N3h68dYVxgjDgRtTUXyg+C BlpWNs1YjwoVsCrKG7Mi8mAbLfBjiV6khxFqegLrAnF+zcGLK9sUWubLaxaC4glNgIEm MfjIUSELpGcLDcS7lyrTT+PuQPKq5jutthqqU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=bNwP30TCvbuFuWd8uLq254KPV+Wr2O5soyps3Rg6jN+HqhWJrfBV4kDesFSBQbCpj2 gZcmswlrO6qg9WQL4FvhPIRw96N2UIqx5PUMSN5r2FAhjYy6rZAFt18ziCFk2pssbMcm rXAV3nJElccBZEivqh+1jwqTIg6U1WUGU/VVo=
In-reply-to: <C65D15E5.C715%falcosoft@mac.com>
References: <26d1d61d0906160005g5bb14543lcd237730624eb81b@mail.gmail.com> <C65D15E5.C715%falcosoft@mac.com>
Reply-to: REALbasic NUG Italian <realbasic-nug.it@lists.realsoftware.com>
Sender: realbasic-nug.it-bounces@lists.realsoftware.com
Lo credevo anch'io. Però ho verificato che così vengono colorate tutte le
celle della Listbox.Se vuoi colorare solo quella dove c'è "Pippo" occorre
individuare il numero della riga dove c'è Pippo e subordinare la colorazione
a quel numero di riga.
Non so perchè ma prova....


Il giorno 16 giugno 2009 9.27, Ing. Antonio Rinaldi <falcosoft@mac.com> ha
scritto:

> 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
>
>
>
>


-- 
Massimo


<Prev in Thread] Current Thread [Next in Thread>