dbTalk Databases Forums  

Changing colours in List view

comp.databases.filemaker comp.databases.filemaker


Discuss Changing colours in List view in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bitstreams
 
Posts: n/a

Default Changing colours in List view - 11-21-2006 , 02:32 AM






I've written a workshop booking system that we've been using for a few
years now. We run Filemaker 7.

One of the screens is a list view of all the bookings and there is a
status column with standard values (such as "Open", "In Progress",
"Ready" etc)

I would like the text in these rows to be a different colour (or
background colour) based upon the value in the status field.

Is this possible? How would I go about coding it?

regards
Simon


Reply With Quote
  #2  
Old   
Ursus
 
Posts: n/a

Default Re: Changing colours in List view - 11-21-2006 , 07:06 AM






Simon,

To change the textcolor:
Look into the text formatting functions, especially the textcolor function.
Combine it with a normal IF or CASE and you are on the way.

The background color can be done through a calculated container. Store your
colors in globals, create a calculation, result as container. Put the
container behind your field, set the field to translucant. Make the
container slightly larger, because when you activatew your field all color
will be invisible. With the container slightly larger you are at least left
with a border around your field.

Ursus

"Bitstreams" <bitstream7 (AT) yahoo (DOT) co.uk> schreef in bericht
news:1164097960.438753.183690 (AT) h54g2000cwb (DOT) googlegroups.com...
Quote:
I've written a workshop booking system that we've been using for a few
years now. We run Filemaker 7.

One of the screens is a list view of all the bookings and there is a
status column with standard values (such as "Open", "In Progress",
"Ready" etc)

I would like the text in these rows to be a different colour (or
background colour) based upon the value in the status field.

Is this possible? How would I go about coding it?

regards
Simon




Reply With Quote
  #3  
Old   
Bitstreams
 
Posts: n/a

Default Re: Changing colours in List view - 11-23-2006 , 02:43 AM



I didn't understand this at first, but have it now. For anyone else
trying to do the same thing, here's the calculation I used.

I already had a field on the list view called Status. I created a new
calc field called calc_status with the following contents;

Case (Status = "Ready" ; TextColor(Status;RGB(58;141;7)) ;Status="Open"
; TextColor(Status;RGB(255;0;0)) ; Status )

then replaced the field on the list view with this one.

and Bingo - it works!

Many thanks for your help with this

Simon

Ursus wrote:
Quote:
Simon,

To change the textcolor:
Look into the text formatting functions, especially the textcolor function.
Combine it with a normal IF or CASE and you are on the way.

The background color can be done through a calculated container. Store your
colors in globals, create a calculation, result as container. Put the
container behind your field, set the field to translucant. Make the
container slightly larger, because when you activatew your field all color
will be invisible. With the container slightly larger you are at least left
with a border around your field.

Ursus



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.