zoukankan      html  css  js  c++  java
  • Changing Icon File Of Push Button At Runtime In Oracle Forms 6i

    Set Icon_File property in When-Mouse-Enter trigger

    Suppose you are creating icon based menu system in Oracle Forms 6i and you want to change icon when mouse over on any push button. 

    You can accomplish this task by writing form level trigger when-mouse-enter and when-mouse-leave, here is the example:

    Create a block, design accordingly and place push buttons as per the requirement and set iconic property to yes and specify default icon file.

    Then write when-mouse-enter trigger Form Level, this trigger will fire when-ever mouse enter over on any item.
    Declare
      vMousetime varchar2(100) := lower(:system.mouse_item);
    Begin
    -- check for your button and specify the new icon
       if vMouseitem = 'yourblock.urbutton1' then
         set_item_property(vmouseitem, icon_file, 'onhover1');
       elsif vmouseitem = 'yourblock.urbutton2' then
         set_item_property(vmouseitem, icon_file, 'onhover2');
    -- and so on for your all buttons
       end if;
    End;

    Write when-mouse-leave trigger Form Level, this trigger will fire when-ever mouse leave any item.

    Declare
      vMousetime varchar2(100) := lower(:system.mouse_item);
    Begin
    -- check for your button and restore the default icon
       if vMouseitem = 'yourblock.urbutton1' then
         set_item_property(vmouseitem, icon_file, 'default1');
       elsif vmouseitem = 'yourblock.urbutton2' then
         set_item_property(vmouseitem, icon_file, 'default2');
    -- and so on for your all buttons
       end if;
    End;

    Now you can test your menu.



     
  • 相关阅读:
    Lucene in action 笔记 case study
    关于Restful Web Service的一些理解
    Lucene in action 笔记 analysis篇
    Lucene in action 笔记 index篇
    Lucene in action 笔记 term vector
    Lucene in action 笔记 search篇
    博客园开博记录
    数论(算法概述)
    DIV, IFRAME, Select, Span标签入门
    记一个较困难的SharePoint性能问题的分析和解决
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220067.html
Copyright © 2011-2022 走看看