• 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.

  • 相关阅读:
    DS博客作业07--查找
    第五次作业——05图
    第四次作业——04树
    DS博客作业03--栈和队列
    DS博客作业02--线性表
    DS博客作业01--日期抽象数据类型设计与实现
    C语言博客05--指针
    C语言博客作业04--数组
    DS博客作业08--课程总结
    C语言-第0次作业
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220097.html
Copyright © 2020-2023  润新知