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

Listbox colorazione riga subordinata a contenuto cella

To: REALbasic NUG Italian <realbasic-nug.it@lists.realsoftware.com>
Subject: Listbox colorazione riga subordinata a contenuto cella
From: Massimo Lista <massimo.lista@gmail.com>
Date: Tue, 16 Jun 2009 09:05:43 +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:from:date:message-id :subject:to:content-type; bh=jM0E3v3hhzrfxNZKeinGj5HJDKTFOLIv8Sl/MSeNEIw=; b=uJ36BpcbrLSOH3p7+t9JIOXA7S7XfztpZMQYlgA35bTdEnYfCVxCotACEq9CFiExsM xkV2mwWgCMZt8/kib4Sc9kcQtuKAbtaH68PZcarpFK8N5Dsayg42xoX4ySFN1Zxmvhir GhUq2SSbAdDXXTve3oNtN0saLZxQQWGHkzvUk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=KQqxuUPFhuD7bRUjlKxYK5mc/s5mCcT1hR0QqS+yq3KXna0mgpFS1SZRs5Wv0Ez3GK s+HRD2ei5CeCSZc+ydhFa9P7ost51JdYdQgU6BTng/5a3qVRIOo/8kUP2EyhcuLAal7T 1alao2MzwjeC7QVuqUfvnrptwnRXojSxjoBgw=
Reply-to: REALbasic NUG Italian <realbasic-nug.it@lists.realsoftware.com>
Sender: realbasic-nug.it-bounces@lists.realsoftware.com
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>