Thinking outside the envelope, wow thats thinking outside the post office. Very 
cool.


Victor Timmons
Tiz's Door Sales, Inc
Visit us at www.tizdoors.com
 P Please consider the environment before printing this e-mail

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Javier Valencia
Sent: Tuesday, December 29, 2009 4:07 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Sending this Again - Scrolling Region Brain Lock

I do something like that where I color an entire row in a scrolling region 
based on the value of a field. I presented this concept at one of the 
conferences a few years back.

This is what I did:
I created a table color background:
   Table: color_background     No Lock(s)
   Descr: Stores color background for fwo_status form

 No. Column Name        Attributes
 --- ------------------
------------------------------------------------------
   1 color_no           Type   : INTEGER

   2 color_stat         Type   : TEXT 1

   3 color_vb           Type   : LONG VARBIT

   Current number of rows:      3
In my case the 3 records were:
R>select * from color_background
 color_no   color_st color_vb 
 ---------- -------- -------- 
          1 O        [BMP]
          2 C        [BMP]
          3 N        [BMP]

The color_st can be O - open, C - Closed, N - Not Known. The corresponding 
values in column color_vb are a red square for Open, a blank square for Closed 
and a blue square for Not Known.

Then I created a view that ties the work order status with the color
background:
CREATE VIEW `fwo_stat_view` AS  +
SELECT * FROM fwo_file T1,color_background T2 + WHERE T1.fwo_stat = 
T25.color_stat

Now, on the scrolling region (based on the view) I placed a DB Image field with 
the variable color_vb across the entire width and height of the scrolling 
region row behind the data fields, and the image option set to stretch.
Now, when you display the data for the view on the scrolling region, the entire 
row background has the status color, i.e. red, blue or blank.
You could use this concept to add a button that you can use to toggle between 
print and don't print and the rows will have different background colors 
depending on the print status. When you toggle the values, you should also 
refresh the view. I seem to remember trying to use the DBImage filed as a 
defined lookup value rather than that on a view and I recall having some 
problems with that.

As you know, anything is possible when using R:Base...sometimes, you just have 
to think outside the envelope.

Javier,

Javier Valencia, PE
913-397-9605 Home
913-915-3137 Cell
913-649-2904 FAX

________________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Tuesday, December 29, 2009 5:15 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Sending this Again - Scrolling Region Brain Lock

I also have not been able to figure out a way to "color" an entire row, and 
have done as Sami says -- just locate a very visible image on each row.  You 
can easily color the rows in a DBGrid, but that doesn't help if you need to 
display an image on each row.

Karen
       


Paul -

One thing I've done for this is to create an image that represents the 
information in each line - in my case, it was a flag of each Canadian 
province.  Then I set up a form variable to select the proper image based on 
the record in the scrolling region and placed a variable image on the scrolling 
region to display the proper flag.

  

I hope that helps.

  

Sami

  


Reply via email to