CSS Row Colouring

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

CSS Row Colouring

Postby Kahuna » Tue Mar 27, 2012 12:06 pm

Using the example CSS Row colouring (from the WIKI) in a web client, I noticed that where there are dates in the row, the top row always shows the dates text in white?

It's not the data because sorting the rows shows the date text in black again. and the new top row (not selected) has the text in white (unreadable).

Is this a bug?
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: CSS Row Colouring

Postby omar » Sun Jul 01, 2012 6:59 pm

Hi,

Alternating rowcolors are easier than ever to implement in Servoy 6. Just add an onRender method to your form and the following default code is added:

onrender_default.png
onrender_default.png (8.39 KiB) Viewed 4253 times


Change the colors to your liking and that's it.

SmartClient:

onrender_sc.png
onrender_sc.png (40.31 KiB) Viewed 4253 times


WebClient:

onrender_wc.png
onrender_wc.png (37.68 KiB) Viewed 4253 times


Note that this not just useful for alternating rowcolors but can be used to create lots of nifty coloring code.
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 377
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: CSS Row Colouring

Postby Harjo » Mon Jul 02, 2012 8:52 am

Omar,

for alternate rowcoloring, the CSS way is preferred, instead of doing onRender! (which is much more expensive!)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: CSS Row Colouring

Postby omar » Mon Jul 02, 2012 11:11 am

Ok, thx Harjo! And did you notice any side effects like mentioned by Kahuna?
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 377
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: CSS Row Colouring

Postby studiomiazzo » Sat Jul 07, 2012 3:12 pm

omar wrote:Ok, thx Harjo! And did you notice any side effects like mentioned by Kahuna?

I actually did. I can't understand the reason why but every now and then rows don't get coloured, being rendered completely white instead. One curious thing is buttons get their background coloured right...
User avatar
studiomiazzo
 
Posts: 124
Joined: Thu Jun 16, 2011 10:48 am
Location: Novara (IT)

Re: CSS Row Colouring

Postby Joas » Mon Jul 09, 2012 9:37 am

studiomiazzo wrote:I actually did. I can't understand the reason why but every now and then rows don't get coloured, being rendered completely white instead. One curious thing is buttons get their background coloured right...

Did you try this in 6.1.0? There is a fix for this problem in 6.1 rc4 and higher and 6.0.7 (which will be released soon).
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL


Return to Web Development

Who is online

Users browsing this forum: No registered users and 5 guests

cron