zoukankan      html  css  js  c++  java
  • Highlighting Text Item On Entry In Oracle Forms

    Highlight a Text Item in Oracle Forms With Visual Attribute

    It is very necessary to highlight the current cursor text item in data entry forms so that a user can easily notice the current item.

    Steps to highlight current item

    1.   Create a visual attribute and set the background color (as per your choice) property as shown below:

    2.   Then write a When-New-Item-Instance trigger to specify the current visual attribute to an item, with the following code.
     
    When-New-Item-Instance Trigger Code:
    -- first get if item type is text item
    Begin
    IF GET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM, ITEM_TYPE) = 'TEXT ITEM' THEN
    -- you can take current item into global variable, it will help you in next trigger
        :GLOBAL.CRITEM := :SYSTEM.CURSOR_ITEM;
     
    -- specify the attribute you just created

        SET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM, CURRENT_RECORD_ATTRIBUTE, 'RECATB');
    -- high light the current item
    END IF;
    End;
    3.   Then write Post-Text-Item trigger to restore the default color of a text item.
     
    Post-Text-Item Trigger Code:
     
    Begin
      IF :GLOBAL.CRITEM IS NOT NULL THEN
        -- you can specify your normal color attribute here
        SET_ITEM_PROPERTY(:GLOBAL.CRITEM, CURRENT_RECORD_ATTRIBUTE, 'Default');
      END IF;
    End;
    Now you can check the result by running your form.

    Highlight current item example data entry form in oracle.

  • 相关阅读:
    Js获取下拉框当前选择项的文本和值
    11、ACL
    10、VLAN
    9、层二交换技术
    8、OSPF
    7、EIGRP
    6、RIP
    5、路由协议原理
    4、设备配置与管理
    3、IP地址划分
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220097.html
Copyright © 2011-2022 走看看