Change item color

Hi all i want to change items color.......i want that when user enters the data the color of that specific item is change and when they move to next item that color is change and so on........on which type this trigger is made.......if at mouse click then it is too difficult to write code on all items
any sujjestion
thanks in advance

Not every item has a post-text trigger. You can store the last item and unset the colour in when-new-item:
if not(id_null(pk.last_item)) then
     set_item_instance_property(pk.last_item,pk.last_row,visual_attribute,pk.last_va);
end if;
pk.last_item := find_item(:system.cursor_item);
pk.last_row := :system.cursor_record;
pk.last_va := get_item_instance_property(pk.last_item,pk.last_row,visual_attribute);
set_item_instance_property(pk.last_item,pk.last_row,visual_attribute,'va_current_item');(pk is a package spec)
Lists are always a problem because the when-new-item doesn't fire when the item is first selected. I once tried to use a FocusListener in a pjc for setting list colours, but even at that level they're a PITA.
Message was edited by:
James Healy
Just had a thought...this solution will screw up if the block is cleared and you do set_item_instance_property for a row which no longer exists.
Also, you can remove a row which has been given a specific VA for the current item (eg to indicate a value < 0) and inadvertently apply that VA to the item in the next row in the block. Maybe a pjc solution is the only viable General Solution?

Similar Messages

  • Changing item color

    Hi,
    i am trying to change an item color.
    if item have one displaying record this code is working
    :txt_item:= '30'
    THEN
    SET_ITEM_PROPERTY('txt_item',FOREGROUND_COLOR,'r0g0b0')
    if displaying record number is two or three or more record it doesnt work. when i run code result is in the below image
    http://img181.imageshack.us/img181/5158/denemevw8.jpg
    thanks
    Edited by: user1059019 on 24.Ağu.2008 02:28

    To set the colour of a single cell in a multi-record block you need to use set_item_instance_property.
    http://www.oracle.com/webapps/online-help/forms/10g/topics/f1_help/builts/setitminst.html?tp=true
    This doesn't allow changes to the foreground_color so you'll need to create a new visual attribute with the required forground colour and then set the visual_attribute property of the record's item.

  • The 'selected items' color randomly changes and I can't figure out why.

    Hi everybody, I recently upgraded to Firefox 13, which appears to be the most stable browser version so far and I really like it. I have loved Firefox very much, having used it since somewhere between versions 2 and 3.
    After upgrading to version 13 I noticed something that annoys me quite a bit. This may have been present before but I can't remember and I did not notice until now.
    On my computer (Windows 7 x64 Ultimate) I have set the color of the 'selected items' (specifically text) to be lime green text on a slightly off black background. I chose this color scheme because it blends very well with Firefox itself (I have the NASA night launch theme), Windows Explorer, and many web pages that I have changed to a dark theme (using the Stylish browser extension). This color scheme has excellent contrast in areas with black text on a light background, as well as light text on a dark background. It has served me well.
    After upgrading to Firefox 13 I have noticed that if the web page is dark with light text, the 'selected items' color changes to lime green text on a light grey background. (Less frequently, it changes instead to off-black text on a lime green background). I have not been able to isolate the threshold where this change occurs (meaning how dark the website background needs to be /how light the text needs to be for this to happen) nor have I found a solution.
    This problem sometimes extends even to sites that have dark text on a light background: when tabs are switched, with no input fields clicked and the address bar is not clicked. This very page (Firefox support) is apparently vulnerable as well.
    This problem only happens on rendered web pages. Firefox's menus, buttons and toolbars, as well as all other programs and Windows itself, are unaffected.
    I want the 'selected items' to remain as I have set it, and not deviate regardless of the apparent contrast or color scheme of the web page being displayed.
    [Edit #1]: Interestingly, as I was copying the information from about:support I noticed that it is affected as well.
    Any suggestions? Thanks so much, and I am sorry for the long-winded description. tl;dr look at the pictures.
    [http://i.imgur.com/vmLZ6.png selected items]
    [http://i.imgur.com/d8xsa.png example1]
    [http://i.imgur.com/2OE9J.png example2]
    [http://i.imgur.com/1lhvb.png example3]
    [http://i.imgur.com/UWOOp.png example4]

    It is always best to avoid making changes to the selected text colors.<br />
    Firefox uses an algorithm to check if the contrast is sufficient and will swap text and background colors if that test fails.<br />
    *http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsTextFrameThebes.cpp#3349
    *http://forums.mozillazine.org/viewtopic.php?f=38&t=1331845

  • Changing default color of the text in a popupkeylov item

    Hi
    I need to change the color of text that is dipalying in a popuplov item, default is : gray and I need it black!
    where can I do it ?

    Sergio,
    I am meaning the item text color( the item witch is of type popup key lov).
    I need to change the color of the text displayed in this item when the user select a value from the lov.
    I know that there is a template for the lov, but this one is for the lov popup, or I am wrong ?

  • Change the color of text item after execute query

    Dear friends
    I would like to know how can I make a tabular form like grid and chang the color of text item when (for exp in emp table) the value of sal column between 2000$ and 4000$.
    I used the SE_IEM_PROPERTY command but it change all of the text items of sal column.
    please help me
    thanks a lot

    Highlight the Existing Record in Forms
    (Compatible with 4.x, 5.x, 6.x & 9i)
    Step 1: Create a New Visual Attribute(BLUE_VA) (Color of highlighted record)
              Font – Arial
              Size – 8
              Style – Plain
              Font width - Normal
              Font Weight - Bold
              Foreground Color – Black
              Background Color – Blue
              Fill Pattern – Transparent
    Step 2: Create another Visual Attribute (WHITE_VA) (Default Color of the record)
              Font – Arial
              Size – 8
              Style – Plain
              Font width - Normal
              Font Weight - Bold
    Foreground Color – Black
              Background Color – White
              Fill Pattern – Transparent
    Step 3: Add Following code to Block-level Trigger WHEN-NEW-RECORD- INSTANCE, POST-BLOCK
    (Add to the block, which has these records)
    -- Following code will only highlight an item
    DISPLAY_ITEM(<block_name>.<item_name>,'BLUE_VA');
    -- Following code will highlight complete Record (ref: DISPLAY_ITEM example)
    DECLARE
              cur_itm VARCHAR2(80);
              cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
    cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
    cur_itm := cur_block||'.'||cur_itm;
    Display_Item( cur_itm, 'BLUE_VA');
    cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
    END LOOP;
    END;
    Step 4: Add Following code to Block-level Trigger PRE-RECORD, PRE-BLOCK
    (Add to the block, which has these records)
    -- Following code will only highlight an item
    DISPLAY_ITEM(<block_name>.<item_name>,'WHITE_VA');
    -- Following code will highlight complete Record (ref: DISPLAY_ITEM example)
    DECLARE
              cur_itm VARCHAR2(80);
              cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
    cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
    cur_itm := cur_block||'.'||cur_itm;
    Display_Item( cur_itm, 'WHITE_VA');
    cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
    END LOOP;
    END;
    I am using the above code in one of my forms and I so far haven't seen any problem

  • Change the color of the text in Display item

    Hi friends,
    Can I change the color of the text of text item or display item
    Regards,
    Fateh

    on the html form element attributes add for example
    style="color:red;"Edited by: DanielB on Feb 20, 2012 12:33 PM

  • How to change selected item color and the selected area size of listview

    What i really need to do is change the following things in XMAL.
    1. Changing the selection color
    2. Size of selected area 
    Thanks in advance.
    Dileepa S. Rajapaksa
    Trainee Developer
    Microsoft, Sri Lanka
    Twitter : @dsrajapaksa
    Blog : http://www.dileepatech.net

    Hi Dileepa,
    It is possible by customize the control by its template, see this for more information:
    ListViewItem styles and templates.
    By changing the selected visual state, you can change the color of the ListView item background, also the size of the selected item.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to change the color of the item in the tree.

    Hi
    I am using TREE for navigation and it has nodes. I would like to change the color of the node if it is clicked.
    Any ideas?

    Hi Denes,
    I had same query like I was looking for, how to highlight node
    which user has clicked ! I followed your stesp like :-
    select "emp" id,
    "mgr" pid,
    CASE
    WHEN PROJECT_NAME = :F200_USER_SELECTED
    THEN '<span class="HighlitTreeNode">'
    || PROJECT_NAME
    || ' '
    || '</span>'
    ELSE PROJECT_NAME
    END name,
    'f?p=&APP_ID.:16:&SESSION.::NO::F200_USER_SELECTED,F200_USER_SELECTED_TABLE_ID,F200_USER_SELECTED_TABLE_NAME:'||"LOB" ||','||"ID"||','||"TABLE_NAME" link,
    null a1,
    null a2
    from TREE_PROJECTS
    and set Stylesheet to :-
    <style>
    a {text-decoration:none;font-weight:bold;}
    a:hover {text-decoration: underline; color: darkred;
    font-weight:bold;}
    .HighlitTreeNode {font-size:12px;font-weight:bold;color: darkred;
    margin-left:20px;white-space:nowrap;}
    </style>
    ====================
    This has solved my query completely.
    Thanks a ton for such a nice tip !
    Regards,
    -DVS

  • Changing text color of item renderer in datagrid

    Hi,
    I have the following datagrid:
    <mx:DataGridColumn field="name" ......... />
    <mx:DataGridColumn itemRenderer="myRenderer" ...... />
    In myRenderer, I extend from the TextInput class; with the
    text color:WHITE
    My question is:
    When I do a mouse rollover/selection on any row of the
    datagrid, how can I change the text color of my renderer?
    If I add the rollover/selection event listener for my
    renderer, it will only change the color when my mouse is over its
    column.
    I want it to change colour whenever the row is selected/
    rollover.
    Thank you very much.
    Regards,
    hy

    Hi,
    The rollOverColor and selectionColor style on the Datagrid
    will only work for the normal columns.
    Since my column extends from the TextInput, the rollOverColor
    and selectionColor style does not seem to have any effect on the
    itemrenderer.
    hy

  • Change the color of selecteditem in a LIST FLEX

    i WANT TO CHANGE THE COLOR OF SELECTEDITEM IN A LIST.  WHEN EVER USER DOUBLE CLICK THE ITEM IT SHOULD CHANGE THE COLOR...
      THIS IS MY LIST WITH DOUBLE CLICK EVENT...PLEASE HELP.....THIS SEEMED SO SIMPLE BUT I ALREADY SPENT FEW HOURS..
    HELP WILL BE APPRECIATED. THANKS
    <s:List id="shopslist1" left="0" right="0" top="57" bottom="0"
                initialize="shopslist1.dataProvider=actions" labelField="details" color="Red"   doubleClick="shopslist1_doubleClickHandler(event)">      
        </s:List>
    protected function shopslist1_doubleClickHandler(event:MouseEvent):void
                    shopslist1.selectedItem. ?????????

    Hello,
    Please see following code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- dpcontrols\spark\SparkListSimpleStyles.mxml -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx">
    <s:layout>
    <s:VerticalLayout/>
    </s:layout>
    <fx:Script>
    <![CDATA[
    protected function myList_doubleClickHandler(event:MouseEvent):void
    myList.setStyle("selectionColor" ,"#CC6600");
    ]]>
    </fx:Script>
    <s:List id="myList"
    alternatingItemColors="[#66FFFF, #33CCCC]"
        doubleClick="myList_doubleClickHandler(event)">
    <s:dataProvider>
    <mx:ArrayCollection>
    <fx:String>Flex</fx:String>
    <fx:String>Flash Builder</fx:String>
    <fx:String>Flash</fx:String>
    <fx:String>Director</fx:String>
    <fx:String>Dreamweaver</fx:String>
    <fx:String>ColdFusion</fx:String>
    </mx:ArrayCollection>
    </s:dataProvider>
    </s:List>
    </s:Application>
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Where do I change the color of this text in the blog page?

    I'm trying to add a blog page to my non-template iWeb site. On the Main Page, I'm unable to change the color of the font in the hyperlinks, where the default reads "Day of Longboarding" and "Read more…". I don't know what I might be overlooking. Any pointers? Thanks…

    That's not something iWeb has a menu item for.  However with the proper javacode you can change a lot about the navbar. This deoo page describes how: Change Navbar Text and Background Color.
    OT

  • How do I change the color of the triangle in a menu bar?

    Hi,
    I have a question that might seem very rudimentary...How can I change the color of the little downward-pointing triangle on my menu bar items that have sub-menus? Specifically, I want those triangles to be invisible when the cursor is not over the menu bar. Right now it is black and changes to white. I'm running Dreamweaver CS5 on a Mac if that makes any difference. Is there a CSS rule for this somewhere that I am not seeing?
    Many thanks for any help!
    -AG

    Those are images, so you will need to change the image.

  • How to change the color of specific row in ALV tree

    Hi,
    I m using method set_table_for_first_display of a class CL_GUI_ALV_TREE.
    The req is to change the color of specific row. Now can anybody tell me how to change the color of ALV tree. As in ALV tree and in this method 'set_table_for_first_display', there is no parameter IS_Layout.
    Pls suggest...

    hi
    hope this code will help you.
    Reward if help.
    REPORT zsharad_test1.
    TABLES: ekko.
    TYPE-POOLS: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    statu TYPE ekpo-statu,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    menge TYPE ekpo-menge,
    meins TYPE ekpo-meins,
    netpr TYPE ekpo-netpr,
    peinh TYPE ekpo-peinh,
    line_color(4) TYPE c, "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
    I.e. Field type may be required in-order for
    the 'TOTAL' function to work.
    fieldcatalog-fieldname = 'EBELN'.
    fieldcatalog-seltext_m = 'Purchase Order'.
    fieldcatalog-col_pos = 0.
    fieldcatalog-outputlen = 10.
    fieldcatalog-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    fieldcatalog-do_sum = 'X'.
    fieldcatalog-no_zero = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'EBELP'.
    fieldcatalog-seltext_m = 'PO Item'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'STATU'.
    fieldcatalog-seltext_m = 'Status'.
    fieldcatalog-col_pos = 2.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'AEDAT'.
    fieldcatalog-seltext_m = 'Item change date'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'Material Number'.
    fieldcatalog-col_pos = 4.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MENGE'.
    fieldcatalog-seltext_m = 'PO quantity'.
    fieldcatalog-col_pos = 5.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MEINS'.
    fieldcatalog-seltext_m = 'Order Unit'.
    fieldcatalog-col_pos = 6.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'NETPR'.
    fieldcatalog-seltext_m = 'Net Price'.
    fieldcatalog-col_pos = 7.
    fieldcatalog-outputlen = 15.
    fieldcatalog-datatype = 'CURR'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'PEINH'.
    fieldcatalog-seltext_m = 'Price Unit'.
    fieldcatalog-col_pos = 8.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    FORM build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
    gd_layout-info_fieldname = 'LINE_COLOR'.
    gd_layout-totals_only = 'X'.
    gd_layout-f2code = 'DISP'. "Sets fcode for when double
    "click(press f2)
    gd_layout-zebra = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text = 'helllllo'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    it_special_groups = gd_tabgroup
    IT_EVENTS = GT_XEVENTS
    i_save = 'X'
    is_variant = z_template
    TABLES
    t_outtab = it_ekko
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    DATA: ld_color(1) TYPE c.
    SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
    UP TO 10 ROWS
    FROM ekpo
    INTO TABLE it_ekko.
    *Populate field with color attributes
    LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
    i.e. wa_ekko-line_color = 'C410'
    ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
    IF ld_color = 8.
    ld_color = 1.
    ENDIF.
    CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
    MODIFY it_ekko FROM wa_ekko.
    ENDLOOP.
    ENDFORM. " DATA_RETRIEVAL

  • Placing images in Illustrator changes their color values-Why?

    I've been placing photoshop tiff files into Illustrator, and doing this seems to change the color values, when I sample them with the eyedropper tool. The images I made use a custom mix of CMYK rich black, with the K set to 100. In Illustrator, they appear to revert to the default 'Photoshop black", approx C75 M68 Y67 K90. This is not my intent of C70 M60 Y58 K100. The Illustrator document is CMYK mode, and I don't know why this is happening. The non-image items (vectors) in my illustrator file DO retain the color values I intended, however.
    Is this some kind of setting I can change in Illustrator? Will this discrepancy show up when this file goes to print? Please help! Thanks.

    WHen the image is not embedded, Illustrator samples the representation values. Those are handled by color management.

  • How to change highlight color in Pages for iPad?

    Is there any way to do this? I know i can highlight selected text, but there is no option for choosing the color. It's always yellow and I would really like to highlight my text with many different colors.

    It looks like the Highlight (background) color can only be yellow.
    The best work around I can find is to change the text color itself which may work like a highlight of the text (like red, green or blue) which makes it stand out.  Maybe that will help?
    Format Inspector (the brush) > Style > Touch the Size and Font item > Color > swipe to see options.
    Note even there you can't go beyond predefined colors but you can make text stand out.
    ivan

Maybe you are looking for

  • Break in a Line Chart in CR10

    I have a line chart that displays data points, with a line that joins the points. Back in CR9, if there was a null value for a date, the line would stop at the prior date, and then start up again at the next date with a value. In CR10.5, this does no

  • Sending  and recieving packets across network

    In my work, I had to send raw packets across the network. I had developed a program in Java using Socket class. It is sending packets but not recieving any. Please give me a solution for the same.

  • Customer Funded PO alert report

    Hi SAP Experts, I need to Develope Report its Customer Funded PO alert report, Eg:They have created one seprate customer GL account for Custmer. While creating PO they will Put Account Assinment Category K and & respective Customer GL account. My cli

  • Does each employee will have an independent vendor account?

    Hi Experts, Happy New Year We have posted our payroll results successfully. But there was one correction has to be done i.e we are recovering the festival advance from employees. The recovery has to be posted to respective vendor accounts. But in rea

  • Updated: Roll out date changes for London

    FYI Londoners. A newly updated roll out map for London has been published today on the main BT Infinity Website. Happy/Sad?? Comments...