About Visual Attributes

1.can we create visual attributes dynamically like record groups.
2.In forms there is any bulit in which gives the RGB format of particular color,i want to change background color at runtime.
set_canvas_property(:system.mouse_canvas,BACKGROUND_COLOR,'darkred');
how i can change the background color of canvas at runtime.
thank's in advance

Though you can not create the va at runtime, if you know the possible combinations or may be 10 visual attributes, u can create in the form and set it dynamically at run time. (set_item_property )
Having said that you can not have any Visual attribute for a canvas. You can have only property class. VA is for text items... PC can not be set at run time.
Best Regards
Rajesh Alex

Similar Messages

  • About visual attribute

    1)I create a va object VA1, It is prompt type!
    and it's prompt foreground color set as "BLUE"
    2)Then create a text item TEXT1.
    It's prompt foreground color as "red"
    3)At runtime,
    I run :
    set_item_instance_property('TEXT1',CURRENT_RECORD,VISUAL_ATTRIBUTE,'VA1');
    4)RESULT:
    Item's foreground color changed to "BLUE"
    But not item's prompt text!!!
    Is it a Bug???

    I know use set_item_property can get it.
    what i really meant:
    I use one prompt visual attribute with prompt foreground color property.
    Then set_item_instance(...).
    Because va is prompt type,I think it will changed item prompt foreground color,not item foreground color.
    But result changed item foreground color.
    It is right?

  • Visual attribute through get_item_property

    Hi People,
    I use forms 10g.While designing the form I wish to assign VISUAL ATTRIBUTE property for my TEXT_ITEM.So i tried wrinting the following code in WHEN-BUTTON-PRESSED of a push button.The code as follows,
    declare
         vlbl varchar(20);
         vatt varchar(20);
    begin
    vatt:=get_item_property('VA7',visual_attribute);
    vlbl:=     get_item_property(':block3.TEXT_ITEM6',vatt);
         end;But it shows me an error as,
    FRM-40105: Unable to resolve reference to item.
    Pls can u help me how to assign the Visual Attribute through get_item_property.
    With Regards
    VIDS

    I tried the same but I am getting FRM-41011: Undefined Attribute.Yes, because you are trying with the visual attribute group property and as i check the GET_ITEM_PROPERTY help it should have work. But also the same error as you mentions Undefined Attribute.
    I also checked the value returned by get_item_property('VA7',visual_attribute) using message which is 'CUSTOM' Yes, it is returns the CUSTOM either you specify the visual attribute group or not.
    So in this case the GET_ITEM_PROPERTY is returning "the name of a logical attribute defined in the resource file" is what I feel.I guess.
    Any idea how "the name of a named visual attribute" can be obtained.The task as the code is looking can be achieved by the following code.
    DECLARE
      vAttribName VARCHAR2(100);
    BEGIN
      vAN:=GET_ITEM_PROPERTY('ITEM_NAME',CURRENT_RECORD_ATTRIBUTE);
      SET_ITEM_PROPERTY('ITEM_NAME',CURRENT_RECORD_ATTRIBUTE,vAttribName);
    END;So, it will set the current record visual attribute property dynamically by the code.
    Also would like to know about resource file? What is it.Well, did not get experience about this matter. And haven't tried before. But maybe documentation will help.
    -Ammad

  • Setting Prompt Visual Attribute Group

    Hi,
    i'm trying to set the prompt visual attribute for a text item is the Forms Builder 6i patch 5. The only available choice is default. I'm using a named visual attribute for the text item and it's working just fine.
    thanks.

    Sorry about this one. I've forgot to change the visual attribute type for prompt.
    thanks.

  • Applying visual attribute to record dependant on value

    hi guys, i have a form which when queried can show 10 records at a time. What i want to do is that if a certain date field is less than the current date then apply visual attribute group to that whole record (which makes the record red).
    I assume such code would go in post query and i would need to use row id or something?
    or am i approaching it the wrong way.
    Thanks

    Yes, you can use the Post-Query trigger for this. You don't need to worry about the rowid as Forms will already know which record is being evaluated. Your code would look something like the following:
    /* Sample Post-Query trigger */
    /* This sample assumes you have created a Visual Attribute called "DATE_RED" */
    BEGIN
       -- Just compare DATE not DATETIME
       IF ( Trunc(:BLOCK.CERTAIN_DATE) < Trunc(SYSDATE) ) THEN
          Set_Item_Instance_Property('BLOCK.CERTAIN_DATE',CURRENT_RECORD, Visual_Attribute, 'DATE_RED');
       END IF;
    END;You will notice in my code sample that I am using the TRUNC function on the dates. This function will return just the date so the compare looks at just the date. If you need to compare the date AND time, then simply drop the TRUNC function from the code sample. ;)
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Changing current visual attribute property for the entire application

    Hi All.
    I want to change the current visual attribute color of my form at the application level, reason being i don't want to generate all the forms again from scratch.
    I know that we can change this using visual attributes but is there a way to change this through some form setting?(Oracle 10g)

    I know that we can change this using visual attributes but is there a way to change this through some form setting?(Oracle 10g) There are two settings in the formsweb.cfg that could help, but only if all of your foreground and background color settings are set to Undefined. The settings are: lookAndFeel=Oracle and colorScheme=<Choose Scheme> where "Choose Scheme is one of the following scheme's: Teal, Titanium, Red, Khaki, Blue, BLAF, SWAN, Olive, or Purple. The default is Teal.
    The fact that you are using a Visual Attribute for your Forms application color scheme tells me that you are not using the default "Undefined" color setting so changing the *colorScheme* setting will _not_ have the effect you want.
    Since you are using Visual Attributes (VA) to define colors, you will need to change the colors in your VA and then recompile your forms for the changes in the VA to be inherited in your forms. Sorry, that is just the way Forms works. Recompiling all of your forms due to this type of change is not that uncommon and is fairly painless if you have a shell script or batch file that compiles all of your forms for you. There are numerous posts in the forum about how to write a script that will do this, so if you don't have a script yet you can search forum for more details.
    The other option would be to build your own routine that would allow you to read an environment setting or pass the setting in the URL to select a color scheme. Then create a group of Visual Attributes used by these color schemes and apply them in each Form's Pre-Form or When-New-Form-Instance triggers. This is a lot of work, but it would give you the flexibility to change your application's color scheme without having to recompile your forms.
    Having said this, it begs the question - why not just use Oracle's predefined color scheme's or use the *lookAndFeel=Generic* setting so the user's desktop color scheme is inherited by your application.
    IMHO, Visual Attributes are best used to accent an application rather than define their _full_ color scheme. For example, I use VAs to highlight the current record and current item as well as highlight required items.
    As for using "JDAPI" as *WoMo* suggests is a design-time tool - not a runtime tool. Using JDAPI would require you to know Java and you will still have to recompile all of your forms using this tool.
    Craig...

  • How to use visual attribute property for the tab canvas

    Hi all,
    i wanted to use set_tab_page_property ,and a visual attribute property for that
    respective tab page .
    but is saying to many declarations to match up . how will i able to do that.
    can any one helip me out ...
    example....
    i wanted to set the page name (just name of the tab page) red color when i query the form under some conditions .
    can anyone help me out in this.
    thanks in advance
    vardhi

    Hi all,
    i wanted to use set_tab_page_property ,and a visual attribute property for that
    respective tab page .
    but is saying to many declarations to match up . how will i able to do that.
    can any one helip me out ...
    example....
    i wanted to set the page name (just name of the tab page) red color when i query the form under some conditions .
    can anyone help me out in this.
    thanks in advance
    vardhi

  • Defining global Visual Attribute groups

    Hi,
    We are currently in the process of moving our forms application from Oracle 6i (client/server) to 10g Webforms (we do not use the designer). The application consists of close roundabout 400 windows.
    In the 6i version we declared some global Visual Attributes in a resource file via the Oracle Terminal program. Now that we moved the forms to 10g these visual attributes groups are missing and its making certain functionalities fail like for example highligting query mode.
    My question is how do we most easily incorporate the missing visual attributes into all the webforms ?
    Kind regards,
    Bo

    As the number of forms is quite large for manual processing, even if the solution already provided is adequate. You may use the Oracle Forms API to automate the task. Theres the ORCL Toolbox applications in top of that API that may help You.

  • Visual attribute for current item

    How can i set the visual attribute of the current item in multi block form so that when user navigate through item in a form its background colour is changed and user can easily trace where the cursor is ?

    1- I have three list box on the form as well so whether post-text-item works over therei have no issues with this and it is working fine in my forms list box
    2- and i have 3 datablock among which 2nd and thid datablock is multirecord datablock where i set current record visual attribute so what is the behaviour @ run time either current record Visual attribute override current item VA or it works fine
    it is working perfectly in multi record also..you need to remember in post text trigger use the same visual attribute used for current record visual attribute

  • Current Record Visual Attribute

    Hallo,
    In a Dev.2.1 Form I have defined a Visual attribute (VA01 - black on yellow) and then in a Data Base block I have assigned VA01 to the 'current record' property.
    One item of that block is not a Data Base one. When I scroll the rows of the Base Table only this item isn't affected by the current record visual attribute, i.e. it remains "black on white".
    Anyone kwnows why ?
    Thanks in advance.
    Dino.

    The 'Current record Visual attribute' property of that block is already set to VA01. The point is that all of the items of that block iherit the attribute, except the one I said, which doesn't belong to the base table. I ask if this behaviour is normal, and how to do to have also this item to be affected by the same visual attribute !
    Thanks.

  • Display item visual attribute

    Hello.
    Is there a way to use set_item_instance_property on display item?
    Or change font color of disabled text item?
    Thanks.

    Set_item_instance_property is the new built-in. Don't use the old display_item. Help says: "Maintained for backward compatibility only."
    Use the new one. There are all properties in the built-in you need for changing the visual attributes.
    try it
    Gerd

  • Ask: how to set visual attribute

    Hi guys,
    I have a data block named BLOCK1, in BLOCK1 there is a text item named ITEM1.
    I display it in tabular form, showing 10 records.
    I wanted the record where the cursor's located shown in different color.
    For example if the cursor at record #1, record #1 therefore is shown in RED. If the cursor is moved to record #2 then record #2 will be shown in RED and record #1 color will revert back to normal.
    I tried putting WHEN-NEW-RECORD-INSTANCE trigger at BLOCK1 with the following code:
    set_item_property('BLOCK1.ITEM1', VISUAL_ATTRIBUTE, 'WHITE');
    set_item_instance_property('BLOCK1.ITEM1', current_record, VISUAL_ATTRIBUTE , 'RED');
    I thought set_item_property('BLOCK1.ITEM1', VISUAL_ATTRIBUTE, 'WHITE') will set all records of ITEM1 to 'WHITE', then the set_item_instance_property('BLOCK1.ITEM1', current_record, VISUAL_ATTRIBUTE , 'RED') will set the particular record where the cursor is in to 'RED'...
    It doesn't work. All the records that has been set to 'RED' by set_item_instance_property will stay red, set_item_property does not revert them to white.
    Any ideas?

    In the property palette of your block there is "current record visual attribute".
    Assign a valid visual_attribute and then when you move from one record to another it will be applied to the current record.
    Hope it helps you,
    Fabrizio
    If this answer is helpful or correct, please mark it. Thanks.

  • Gettng item property - prompt visual attribute

    have set the prompt visual attribute to 'ACTIVE_COL'
    SET_ITEM_PROPERTY ('TEST',PROMPT_VISUAL_ATTRIBUTE, 'ACTIVE_COL')
    but when I try to get the value back it return 'CUSTOM'
    GET_ITEM_PROPERTY ('TEST',PROMPT_VISUAL_ATTRIBUTE)
    Why???

    I have overcome this problem by setting item property in form design to 'ACTIVE_COL' then change it back to 'DEFAULT'
    it works fine.

  • Visual Attribute

    Dear Experts,
    I have two Items. Now, when I type 'A' in 1st text Item, then automatically visual attribute of the 2nd display Item should be changed to 'RED' (e.g.). The 2nd dispaly Item will return the same value as 1st text item(i.e. 'A').
    Note: I have just type 'A', My cursor is still in 1st text Item. It is not in 2nd item(display)
    I wud much appreciate if anyone help me out on this.
    Thanx in advance.
    Bhaveh

    I am now rather confused as your second message appears to be different requirement to your first.
    The method I had in mind is to make your item1 length one and with AUTOSKIP on.
    WHEN-VALIDATE-ITEM on item1
    :item2 := :item2||:item1;
    WHEN-NEW-ITEM-INSTANCE on item2
    set_item_instance_property('item2',current_record,visual_attribute,'red');
    -- Put Any other code here you want to fire after each character
    :item1 := null; -- makes room for next character to be typed.
    go_item('item1');
    Thus the cursor appears to stay in item1 where any number of charcters can be typed, although they appear in item2. The trigger on item2 fires after each charcter and can be made to do whatever you want.

  • Visual attribute for records in MULTISELECT block

    Hi,
    For some type of records I need to set background colour yellow.
    The block has property set to QMSSO$MSEL_BLOCK.
    I am using below code for each field in the block displayed:
    POST_QUERY for the block:
    set_item_instance_property('block.column_name',l_cur_rec, visual_attribute, 'QMS$BLACK_ON_YELLOW');
    Also on when-new-record-instance I have added following code for getting the yellow colour on select:
    if upper(:VANN.MESSAGE_NAME) LIKE '%PROB%'
    then
    qms$user_prefs.set_va_selected_record('QMS$BLACK_ON_YELLOW');
    else
    qms$user_prefs.set_va_selected_record('QMS$WHITE_ON_DARKBLUE');
    end if;
    But problem is that when we navigate from record with background Yellow to any other record displayed the visual attribute is change back to Grey (yellow colour disappears).
    This functionality must work for multiselect block. Is there any headstart function/utility which can help me to resolve the problem.

    1- I have three list box on the form as well so whether post-text-item works over therei have no issues with this and it is working fine in my forms list box
    2- and i have 3 datablock among which 2nd and thid datablock is multirecord datablock where i set current record visual attribute so what is the behaviour @ run time either current record Visual attribute override current item VA or it works fine
    it is working perfectly in multi record also..you need to remember in post text trigger use the same visual attribute used for current record visual attribute

Maybe you are looking for