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 Valle <maxduepuntozero@yahoo.it>
Date: Tue, 16 Jun 2009 12:30: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; domainkeys=pass (test mode) header.From=maxduepuntozero@yahoo.it
Delivered-to: listarchive@realsoftware.com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.it; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer; b=xLO+W5ds+XNpXifdMNigMCj52Bo69WggXemgH/RE7KeNHPSjBQULVABmIrhk37Faz5d9Zb1t4OMrA2lXFZyAeHtRXsZvkkvrRahhxMLCfHhVchI5SHTImn9k8lHdKJDyEMAJjY4y9Ngs45IG//bdP67MiUwQ3xgxa182m960UA0= ;
Domainkey-status: good (test mode)
In-reply-to: <26d1d61d0906160005g5bb14543lcd237730624eb81b@mail.gmail.com>
References: <26d1d61d0906160005g5bb14543lcd237730624eb81b@mail.gmail.com>
Reply-to: REALbasic NUG Italian <realbasic-nug.it@lists.realsoftware.com>
Sender: realbasic-nug.it-bounces@lists.realsoftware.com

Massimo, temo tu abbia frainteso l'utilizzo di questo evento. Prova con questo codice:

  if row < me.listcount then
    If me.Cell(row, 1) = "Pippo" then
      g.ForeColor=RGB(255,176,98) //Arancio
      g.FillRect(0,0,g.Width,g.Height)
    end if
  end if


Massimo Valle


On 16/giu/09, at 09:05, Massimo Lista wrote:

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>