Give color to canvas dynamically

i have form and on that number os buttons calling different forms.
suppose i have form aficd12.fmb and on that
b1,b2,b3 buttons and they calling f1,f2,f3 forms respectively.i hane a List Items and i have given different color in that list.suppose i open that form and give set color to pink and then press buttin b1,then the color os canvases of f1 will be pink.like wise.hope i am clear now.

You can get the canvas name for any item with the Get_Item_Property( ..., ITEM_CANVAS ) ;.
So, in the When-New-Form-Instance trigger, you can change the property.
Set_Canvas_Property( Get_Item_Property( :system.cursor_item, ITEM_CANVAS ), BACKGROUND_COLOR, your_new_color ) ;Francois

Similar Messages

  • How to give color of particular cell in alv list display for dynamic table

    Dear Experts,
    i want to give color of a particular cell in alv list display (reuse_alv_list_display). Here i am passing data through dynamic table?

    Hi,
    Se this:
    DATA: lt_color    TYPE lvc_t_scol WITH HEADER LINE.
    DATA: BEGIN OF data_tab OCCURS 0.
             tabcolor     TYPE   lvc_t_scol,
          END OF data_tab.
    * Befone ALV call
      alv_layout-coltab_fieldname  = 'TABCOLOR'.
    * For each row in data_tab
    REFRESH: lt_color.
    CLEAR: lt_color.
    lt_color-color-col = 6.
    lt_color-color-int = 1.
    lt_color-fname = FIELD1'.
    APPEND lt_color.
    lt_color-color-col = 2.
    lt_color-color-int = 0.
    lt_color-fname = 'FIELD2'.
    APPEND lt_color.
    data_tab-tabcolor[] = lt_color[].
    append data_tab.
    Best regards,
    Leandro Mengue

  • How to give colors to the top-of-page in ALV Grid

    How to give colors to the top-of-page in ALV Grid
    in table GT_LIST_TOP_OF_PAGE i am filling 3 rows ,i need 3 different colors to be displyed on top-of-page(one color to one row)
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    I_LOGO = 'ENJOYSAP_LOGO'
    IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    please help mee

    HI Kranthi,
    Check out teh foll. link,
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    Hope this helps.

  • How to display the rows in a color for specific dynamic condition.

    Hi,
    I am new to OAF. I created a custom Search Page.My requirement is we need to display a color for specific dynamic condition. Could any one help me how to do this?
    Thanks in Advance
    Sruthi.

    Hi,
    Sruthi wrote:
    I am new to OAF. I created a custom Search Page.My requirement is we need to display a color for specific dynamic condition. Could any one help me how to do this?------I think we can display colours at coloumns level only,nt at row levevl.
    ------use CSSStyle to set the colour, via webBean.
    Co-ProcessRequest:*
    import oracle.cabo.style.CSSStyle;
    CSSStyle oraaniltext = new CSSStyle();
    oraaniltext.setProperty("color", "#F6358A");
    oraaniltext.setProperty("background-color", "#000000");
    OAMessageTextInputBean comCode = (OAMessageTextInputBean)webBean.findChildRecursive("InvoiceIdTI");
    comCode.setInlineStyle(oraaniltext);
    http://www.computerhope.com/htmcolor.htm
    Regards
    Meher Irk
    Edited by: Meher Irk on Oct 25, 2010 9:46 PM

  • Color Cell in Dynamic ALV

    Hi all
    i try to put color in the dynamic alv, but i become a dump message
    Runtime Errors         OBJECTS_MOVE_NOT_SUPPORTED
    Date and Time          28.10.2010 08:46:49
    Short text
         Conversion of type "h" to type "g" not supported.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "SAPLSLVC" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
    Error analysis
         You attempted to move one data object to another.
         This is not possible here because the conversion of a data object
         of type "h" to type "g" is not supported.
    my code implementation looks like
      method validate_order_deli.
        data ls_scol        type lvc_s_scol.
        data ls_colo        type lvc_s_colo.
        data ls_aoc_percent type zsd_aoc_percent.
        data lf_deliv       type lifmg.
        data lf_db_percent  type f.
        data lf_calc_perc   type f.
        refresh et_color.
        select single *
          from zsd_aoc_percent
          into corresponding fields of ls_aoc_percent
          where acin = 'X'.
        if sy-subrc <> 0.
          exit.
        endif.
        lf_db_percent = ls_aoc_percent-percent.
    *    ls_scol-fname = if_fieldname.
        ls_scol-fname = 'MATNR'.
        if if_deliv <> 0.
          me->calc_amour_unit(
            exporting
              if_matnr  = if_matnr
              if_amount = if_deliv
              if_input  = if_deliv_unit
              if_output = if_order_unit
            importing
              ef_amount = lf_deliv
          lf_calc_perc = ( lf_deliv * 100 ) / if_order.
          if lf_calc_perc < lf_db_percent.
            ls_colo-col = cl_gui_resources=>list_col_positive.
          else.
            ls_colo-col = cl_gui_resources=>list_col_negative.
          endif.
          ls_scol-color = ls_colo.
          append ls_scol to et_color.
        else.
          exit.
        endif.
      endmethod.                    "validate_order_deli
      method add_color_field.
        data ls_fcat type lvc_s_fcat.
        ls_fcat-fieldname = 'COLOR'.
        ls_fcat-ref_field = 'COLTAB'.
        ls_fcat-ref_table = 'CALENDAR_TYPE'.
        append ls_fcat to ct_fcat.
      endmethod.                    "add_color_field
          ls_lvc_s_layo-cwidth_opt = 'X'.
          ls_lvc_s_layo-ctab_fname  = 'COLOR'.
    i don't no, what's wrong...
    thx for help

    *&      Form  generate_alv
    *       text
    form generate_alv.
      field-symbols <lt_any_table> type any table.
      if lrf_gui_custom_container is initial.
        create object lrf_gui_custom_container
          exporting
            container_name = lf_container.
        create object lrf_gui_alvgrid
          exporting
            i_parent = lrf_gui_custom_container.
        ls_lvc_s_layo-cwidth_opt = 'X'.
        ls_lvc_s_layo-ctab_fname  = 'COLOR'.
        check sy-subrc = 0.
        call method lrf_gui_alvgrid->set_table_for_first_display
             exporting
    *             i_buffer_active               =
    *             i_bypassing_buffer            =
    *             i_consistency_check           =
    *             i_structure_name              = 'ZAM_CELL_COLOR'
    *             is_variant                    = ls_disvariant
    *             i_save                        = 'A'
    *             i_default                     = 'X'
               is_layout                     = ls_lvc_s_layo
    *             is_print                      =
    *             it_special_groups             =
    *             it_toolbar_excluding          =
    *             it_hyperlink                  =
    *             it_alv_graphics               =
    *             it_except_qinfo               =
    *             ir_salv_adapter               =
              changing
                it_outtab                     = <gt_table>
                it_fieldcatalog               = gt_dyn_fcat
    *             it_filter                     =
             exceptions
               invalid_parameter_combination = 1
               program_error                 = 2
               too_many_lines                = 3
               others                        = 4.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
      endif.
    endform.                    "generate_alv
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
      set pf-status 'ZAM_CELL_STATUS'.
      set titlebar 'ZAM_CELL_TIT'.
      perform generate_alv.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    module user_command_0100 input.
      data lf_okcode type syucomm.
      call method cl_gui_cfw=>dispatch.
      lf_okcode = ok_code.
      case lf_okcode.
        when 'EXIT'.
          set screen 0.
          leave screen.
        when 'CANCEL'.
          leave program.
        when 'BACK'.
          set screen 0.
          leave screen..
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT

  • How to give colors to the top-of-page in ALV List Display

    how to give colors to the top-of-page in ALV List Display....

    Check this blog.........
    It provides your required output...........
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    See the point 7 for complete code...
    Regards,
    Pavan

  • Choose desired color for canvas

    Dear all,
    i am using oracle developer suite 10g for windows plateform.
    i want to use a specific colour for my canvas which is on my desktop.
    i capture the desktop, and open it in mspaint, and pick that color and add it to custom color.
    now i am wondor how to select it as a background color for the canvas.
    any idea?
    Regards.

    Maahjoor wrote:
    i am pretty sure that it was not a registery technique.
    it was purely oracle forms technique.Yes !!!
    you can.
    follow the instruction.
    In 10g
    Set to Editable
    Edit -> Preferences -> change colour mode property to Editable -> Exit form builder
    Add Custom Colour
    Re-open the form
    Open a canvas
    From Edit Menu-> Layout Options -> Colour Palette
    Select a colour to edit by clicking on an undefined colour i.e. a white square on the bottom far left of the palette
    In the current colour dialog it will say something like custom5 change it to a more meaningful name you can call it the rgb value
    Then click on rename -> then Edit -> change the rbg value to the colour you want to add-> click OK
    Export the custom colour palette
    From the canvas -> Edit -> Export -> Colour Palette -> give it a name
    Your are done...
    Hamid

  • SSRS - Expression to color column value dynamically in Matrix

    Hi ,
    I have a matrix which looks like :
    The <<Expr>> value can be 1 /0 /"-" .
    The Expr value is being calculated dynamically.
    The data set query I am using has a column called due_days.
    In the color expression of the <<Exp>> box I am using the expression as :
    =IIf(Fields!Due_Days.Value>14  and Fields!Notes_Count.Value>0,"Blue",(Iif(Sum(Fields!Notes_Count.Value)=0 ,"Red","Black")))
    My requirement is if the Due_Days column value is >14 then I need to highlight the value as blue else black and if value is 0 then red. When I use the above query it is just highlighting the color blue for 1st column only. Eg: 4th row . Due days for month
    of Oct and Nov is > 14 but it shows blue only for month of oct.
    How can i resolve the issue?

    In select query i have 5 columns:
    Due days(Which is difference between 2 dates) ,
    Notes count (Which is just a count of notes  entered or not having value 0/1  and value '-' if another column CRD is greater than the matrix month and year.)Eg: below date 11/12/2014 is greater than Oct 2014 hence Oct 2014 should have "-"
    Month Name , Year , Month Nbr (last 6 months which I cross joined with the table to get counts for each month)
    The matrix has year and last 6 month  as column groups
    Color coding should be if notes count is 0 then red  ,if notes count is 1 and due_days> 14 then blue else black . When i try to use expression for color as i mentioned above, it colors only 1st colum.eg:  2nd row
    Nov 2014 is blue but for jan 2014 also it should show blue as due days>14 .
    Is there any way i can do that ??
    Eg: data set returns value as :
    Due Days        CRD                              Month         
    Month_Nbr    Year   Notes _Count
    5             2014-11-28 00:00:00.000    December          12         2014       
    0
    5               2014-11-28 00:00:00.000    February           2         2015        
    0
    5             2014-11-28 00:00:00.000    January              1           2015      
    0
    5            2014-11-28 00:00:00.000    November          11          2014       1
    5            2014-11-28 00:00:00.000    October              10          2014        0
    5            2014-11-28 00:00:00.000    September          9           2014         0
    Matrix is of the form :
                  YEAR
                  MONTH
    CRD        Notes_count

  • Problem with coloring cells in dynamic fieldcatalog

    Hi All,
    I am trying to color cells based on the values in the cells. Here we are using dynamic fieldcatalog and internal table to build the ALV grid.I am getting problem in adding a field to the fieldcatlog which is of type lvc_t_scol. This Part of the code is used to build fieldcatlog dynamically.
    DEFINE add_cat.
        add 1 to lv_count1.
        lwa_fldcat-col_pos     = lv_count1.
        lwa_fldcat-fieldname = &1 .
        lwa_fldcat-reptext   = &2.
        lwa_fldcat-inttype   =  &3.
        lwa_fldcat-intlen    = &4.
        append lwa_fldcat to lt_fldcat .
      END-OF-DEFINITION.
    *Add Columns to the fieldcatalog
      add_cat c_proj 'Project' 'C' '30'.
      add_cat c_cust 'Customer' 'C' '30'.
      lwa_fldcat-col_pos     = 12.
        lwa_fldcat-fieldname = 'cellcolor' .
        lwa_fldcat-reptext   = 'cell color'.
    <b>    lwa_fldcat-inttype   =  'lvc_t_scol'.</b>
        append lwa_fldcat to lt_fldcat .
    Here i want to assign internal table(lvc_t_scol) to the fieldcatalog as a field.But  lwa_fldcat-inttype is of size 1 which will take one char. Is there any way that we can assign field of type internal table to the field catalog. Becoz of this i am unable to color cells in my ALV grid.
    Thanks

    It is not possible with the METHOD cl_alv_table_create=>create_dynamic_table to include another table inside that newly generated table.
    I have tried to do it with the code and I got the dynamic table created after at the end of the program.
    In the code,
    <DYN_TABLE> has same effect as your <table> variable
    <DYN_WA> has same effect as your <HEADER>
    REPORT  ZTEST_NP_DYNAMIC.
    DATA: DY_TABLE TYPE REF TO DATA,
          DY_LINE  TYPE REF TO DATA.
    FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
                   <DYN_WA>,
                   <DYN_FIELD>.
    FIELD-SYMBOLS: <FS> TYPE ANY.
    * To generate the Dyanmic table with the COLOR
    DATA: LS_SOURCE TYPE STRING.
    DATA: LT_SOURCE LIKE STANDARD TABLE OF LS_SOURCE WITH HEADER LINE.
    DATA: L_NAME LIKE SY-REPID.
    DATA: L_MESSAGE(240) TYPE C,
          L_LINE TYPE I,
          L_WORD(72) TYPE C.
    DATA: L_FORM(30) TYPE C VALUE 'TABLE_CREATE'.
    LT_SOURCE = 'REPORT ZTEST_SUBROUTINE_POOL.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'FORM  TABLE_CREATE USING I_FS TYPE ANY.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: BEGIN OF LT_GENTAB OCCURS 0.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: BUKRS TYPE BUKRS. '.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: BKTXT TYPE BKTXT. '.
    APPEND LT_SOURCE.
    * you can add your fields here.....
    LT_SOURCE = 'DATA: COLOR TYPE lvc_t_scol. '.  " <<
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: END OF LT_GENTAB.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: POINTER TYPE REF TO DATA.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'CREATE DATA POINTER LIKE STANDARD TABLE OF LT_GENTAB.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'I_FS = POINTER.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'ENDFORM. '.
    APPEND LT_SOURCE.
    L_NAME = 'ZTEST_SUBROUTINE_POOL'.
    CATCH SYSTEM-EXCEPTIONS GENERATE_SUBPOOL_DIR_FULL = 9.
      GENERATE SUBROUTINE POOL LT_SOURCE NAME L_NAME
               MESSAGE L_MESSAGE LINE L_LINE WORD L_WORD.  "#EC CI_GENERATE
    ENDCATCH.
    IF NOT L_MESSAGE IS INITIAL.
      MESSAGE E000(0K) WITH L_MESSAGE L_LINE L_WORD.
    ENDIF.
    ASSIGN DY_TABLE TO <FS>.
    PERFORM (L_FORM) IN PROGRAM (L_NAME) USING <FS>.
    ASSIGN DY_TABLE->* TO <DYN_TABLE>.
    * Create dynamic work area and assign to FS
    CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
    ASSIGN DY_LINE->* TO <DYN_WA>.
    Write: 'bye'.
    Regards,
    Naimesh Patel

  • Background color change of dynamic graphic

    hi ,
    i am using 3D Gauge dynamic  graphic i want to change image backgrond color from white to blue.
    thanks in advance.
    regards,
    rohit

    You can add a <rect> tag, see text in bold below ...
    <?xml version="1.0" encoding="UTF-8"?><svg height="300" text-rendering="geometricPrecision" width="300">
         <rect height="299" id="Background"  width="299" x="0" y="0" style="fill:none;stroke:rgb(0,255,0);stroke-width:1" />
         <defs>
              <radialGradient cx="70%" cy="30%" fx="80%" fy="40%" gradientUnits="objectBoundingBox" id="black-white_1" r="150%" spreadMethod="pad">
                   <stop offset="100%" stop-color="rgb(180,180,180)" stop-opacity="1"/>
                   <stop offset="100%" stop-color="rgb(0,0,0)" stop-opacity="0"/>
              </radialGradient>
         </defs>
         <ellipse cx="150" cy="150" fill="url(#black-white_1)" rx="140" ry="140" stroke="rgb(0,0,0)" stroke-width="1"/>
         <ellipse cx="150" cy="150" fill="none" rx="140" ry="140" stroke="url(#black-white_1)" stroke-width="4"/>
         <line fill="none" id="Needle" stroke="rgb(255,20,20)" stroke-linecap="round" stroke-width="5" transform="rotate(330 150 150)" x1="150" x2="150" y1="150" y2="260"/>
    </svg>
    Regards.

  • How to change color of canvas?

    I made sure the background color swatch in the lower left of the tool box was set to blue.  Then I went to Image>Resize>Canvas Size> and changed the sizes.  Then I set the Color Extension to the background color blue, and the little box to the right of this showed the blue I wanted.
    Then I clicked OK.
    The sizes changed properly, but the color won't change colors at all.  It stays an ugly putty brown, no matter that I have tried every single way in that color extension box pull-down menu.
    Any help will be much appreciated.

    Try this:
    Set the background color (lower left) to blue
    Go to File>new>blank file. Enter width & height in inches for the desired document, resolution 240-300px/in for printing, background contents: background color.
    OK

  • Column color in a dynamic report

    Hi,
    I have a report with a dynamic number of columns (50 to 100).
    Now I need different background colors for certain columns not only the text but the whole table field (<td>).
    Is there anywhere an example, what I have to do?
    thanks,
    Elke

    I generate the query by a function (PL/SQL Function Returning SQL Query).
    I have to report on timetable of schools. Per age group I have to report per subject (e.g. sport, mathematics,...) the number of lessons and the number of lessons without teacher - one row per age group.
    In different schools are different subjects possible -> the report have different number of columns.
    Now I need one background color for number of lessons and another background color for the number of lessons without teacher.
    In the template (standard) I have only one "<td>".
    In css-class (column attributes) I can set a class per column. The background color is changed only behind the number not the whole field.
    Which css-classes on wich places I have to change?
    Elke

  • Hide the Canvas dynamically

    All,
    I am working in 11i instance, I have created a Custom Form using Template.fmb and my requirement is like this...
    we have multiple canvases in one window, dynamically we have to display and hide the canvases and I have used the below code in WHEN_NEW_FORM_INSTANCE trigger but it is not working....
    SHOW_VIEW('ID_CANVAS');
    HIDE_VIEW('ENCLO_CANVAS');
    Can someone help me....
    Thanks,

    One more thing, I have created custom Horizontal Toolbar canvas & Vertical Toolbar canvas and assigned to the window... at runtime toolbars are not visible....I haven't worked with Horizontal or Verticle toolbars very often, however, you have to make sure you change the following properties of your Window object:
    Horizontal Toolbar Canvas and Vertical Toolbar Canvas
    Make sure you set these properties to your toolbar canvases that you created.
    Craig...

  • Paint bucket tool not painting color on canvas

    Ok - I'm new to photoshop (I just got cs4) and can't seem to get the paint bucket tool to paint the background.  I've started out with a new canvas, selected paint bucket and color from color menu on right side.  Foreground is selected and the paint bucket tool is showing on my cursor - when I click on it over my canvas I expected it to change to the color I selected and it does nothing.  Help??

    I am having the same problem and have checked the mode.  Normal.  Still not working- I have tried eve
    rything includig unlocking the layer- checking the opacity and tolerance.
    using it with other photos and still nothing.

  • JPaint resizing the canvas dynamically

    Hi guys,
    I am in the process of creating a program similar to MSPaint. The problem I am facing right now is how can I resize the image/canvas like in the MS Paint?? Do I need to have a multiple frame or a multiple panel inside?? Any suggestions??

    If you open MS Paint you'll know what I mean, you can resize the canvas any time you want. This is what I did so far:
    public class JPaintPanel extends JPanel implements JPaintView, ImageObserver{
         private     BufferedImage picture;
         private JPaintController control;
         public JPaintPanel(JPaintController jpc){
              picture = jpc.getImageCopy();
              control = jpc;
              UpdateListener ul = new UpdateListener();
              addMouseListener(ul);
              addMouseMotionListener(ul);
         public void paintComponent(Graphics g){
              super.paintComponent(g);
              Graphics2D g2 = (Graphics2D) g;
              g2.setColor(Color.BLACK);
              g2.drawImage(picture, null, 0, 0);
              control.drawToolActivity(g2);
         private void updateWindow(){
              super.repaint();
         }so I asked paintComponent to draw a blank image here (which is picture). However when I already draw that Image I can't resize it from the user....

Maybe you are looking for

  • How to suppress Joblist in OAS 10.1.2.0.2 console

    Hi all, I am using Reports Server Version 10.1.2.0.2 When I am running the below URL, the list of processed, failed and scheduled jobs are getting displayed. Is there any way to stop browsing the list? https://<server-ip>:<port>/reports/rwservlet/sho

  • Best Way To Upload Sales in SAP

    Hi, I wanted to know what is the best way to upload sales in sap system, currently we are doing manually. We fetch data from the 3rd Party POS system and converting it into XMLfile and create it's IDOC, After that uploading sales by t-code BD20. We h

  • Scene not being found AS3

    hi i have a button with a function of a gotoAndStop but when it is clicked this output error appears: ArgumentError: Error #2108: Scene 1 was not found. at flash.display::MovieClip/gotoAndStop() at fixing_fla::iconInterface_mc_4/home() Here is the co

  • The registry refers to a nonexistent java runtime environment installation

    I was having trouble running some Java programs (not my own) in Windows XP, and in the process I uninstalled and installed JRE versions 6, 7, and 8, one at a time, probably in the order 7, 8, 7, 6, 7. The program that had the original problem only wo

  • Data Load - un-successful for LIS structure 2LIS_01_S005

    Hi Guys, I have installed a SD infocube 2LIS_01_S005 (for Shipping Point) from BC, every thing went on smooth, finally when I arrive at content display, I found zero records. I am unable to trace where thing(s) went wrong. please write in your valuab