Text and background colour in a scrolling table

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Glenn Boyce
Posts: 137
Joined: Thu Jul 24, 2008 11:22 pm

Text and background colour in a scrolling table

Post by Glenn Boyce » Thu Sep 04, 2008 3:55 am

I want to have the top row in a table as the header row. I want the row to be dark red (128,0,0) with white bold text. I have set the text foregroundcolor and backgroundcolor of line 1 BUT the background color only shows behind the text - ie it doesn't color across the whole row. I can color the whole table and have white heading but not just row 1. Can't believe there isn't a solution!!

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Thu Sep 04, 2008 9:42 am

Hi Glenn

I can think of one solution although I'm sure there might be others...

Set up the table as transparent and put a coloured graphic behind (or temporarily colour the whole thing with your correct heading and type colours), then take a screen grab of it. Edit it in Photoshop so that you have your heading only. Import this and position it exactly on top where it should go. This way, your users can't edit the heading; and the heading will remain fixed of course, even if the table is scrolled, which is what you need, I guess.

Hope that of some help there.

:)

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

Post by bangkok » Thu Sep 04, 2008 6:31 pm

You should have a look on this thread:
http://forums.runrev.com/phpBB2/viewtopic.php?t=1461

we talked about the same idea, with 2 solutions :

-small fields behind the table field

-small graphics in HTMT within the table field

Glenn Boyce
Posts: 137
Joined: Thu Jul 24, 2008 11:22 pm

Just the header colour

Post by Glenn Boyce » Thu Sep 04, 2008 10:41 pm

That all made interesting reading. Thanks guys. I'm currently using header fields that are separate to the table field and this works just fine - especially as they remain there when you scroll down - but cause an issue when you need to scroll sideways.

What would be best in actual fact would be to have two table fields - one as the header without scroll bars and one line deep and the other as the main table. Does anyone know the code for getting the top field to scroll sideways at the same time as the main table. This would solve my problem.

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Thu Sep 04, 2008 11:24 pm

Hi Glenn: there are tons of superb stacks (and plugins) available as free downloads from the most-excellent So Smart software.

http://www.sosmartsoftware.com/?r=revol ... ciels&l=en
is the address to download their Tutorials Picker and one of the stacks listed is called How to Manage Table Fields. Looks to be just what you're after...

:)

Post Reply