DataGrids... and printing...

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: DataGrids... and printing...

Post by bangkok » Fri Oct 11, 2013 1:11 pm

Traxgeek wrote: If I want to override the row colour of a DG row (just for one (or more) specific row(s) within the full DG) how would I do that please ?
.
http://lessons.runrev.com/s/lessons/m/d ... -to-a-cell

->add a new invisible column, that will contain a flag (like to be colorized = 1 for instance)

->in the default column behavior :

[change]

Code: Select all

on FillInData pData
   set the text of me to pData
   SetForeGroundColor
end FillInData
[add]

Code: Select all

private command SetForeGroundColor
   if GetDataOfIndex(the dgIndex of me, "theFlag")=1 then
      set the textcolor of me to "black"
      set the backgroundColor of me to 68,234,45
      set the opaque of me to true
   else
      set the textcolor of me to "black"
      set the backgroundColor of me to "white"
      set the opaque of me to false
   end if
end SetForeGroundColor
A stack with some examples, to download :

http://forums.runrev.com/viewtopic.php? ... 540#p78299

Post Reply