Re: Help with forms 6i and making colors in fields

From: Aravind <rfjam4_at_yahoo.com>
Date: 19 Aug 2002 08:04:32 -0700
Message-ID: <6f1f2925.0208190704.2d3e8d1e_at_posting.google.com>


[Quoted] Try using display_item. Disadvantage of this though is that this needs to be done for every item in the record. something like following

declare
  felt varchar2(50) :=
:system.current_block||'.'||:system.current_item;   værdi varchar2(50) := name_in(felt);
begin
  if værdi = '2' then
    display_item(felt,'SORT_PA_GULT');

    /**
     ** Finish this code by adding all the items in the record
     **/
  • Message ('Lav teksten sort på gul'); -- English ** Make text black on yellow else display_item(felt,'DATA_NORMAL'); /**
    • Finish this code by adding all the items in the record **/
  • Message ('Lav teksten almindelig'); -- English ** MAke record default color end if; end;

Good Luck

"Rene S. Nielsen" <renesn_at_image.dk> wrote in message news:<3d5ea523$0$27853$edfadb0f_at_dspool01.news.tele.dk>...
> Hi
>
> I need some help to solve this problem.
>
> I have a form, with a datablock built on a view. It's a multi row view
> (Numbers of rows displayed = 24)
>
> What I need to do is make every line (Record) a seperate color, depending on
> the value in the record.
>
> I have created a trigger (When-new-record-instance) with the following
> code.
>
> *************
> declare
> felt varchar2(50) := :system.current_block||'.'||:system.current_item;
> værdi varchar2(50) := name_in(felt);
> begin
> if værdi = '2' then
> Set_Item_Property(felt,VISUAL_ATTRIBUTE,'SORT_PA_GULT');
> -- Message ('Lav teksten sort på gul'); -- English ** Make text black on
> yellow
> else
> Set_Item_Property(felt,VISUAL_ATTRIBUTE,'DATA_NORMAL');
> -- Message ('Lav teksten almindelig'); -- English ** MAke record default
> color
> end if;
> end;
> ******************
>
> But my problem is that this code, will make all the record black and yellow.
> And I only want the single record this color.
>
> I know this can be done. I have seen it ons, but I don't have the code for
> it.
>
> Any sugestions...
>
> Please help
>
> Regards
> Rene S: Nielsen
Received on Mon Aug 19 2002 - 17:04:32 CEST

Original text of this message