Sponsored

Change the font size and weight of text items and push buttons on mouse hover in Oracle Forms.

An example is given below to highlight the text in text items and highlight the label of a push button item at run time whenever mouse enters or leave, by using set_item_property and get_item_property command to set the Font_Size and Font_Weight property.

The code is written on When-Mouse-Enter trigger and on When-Mouse-Leave trigger.

The following is the screen shot of this example:


This form can be downloaded from the following link Mousehover.fmb

The code is written on the When-Mouse-Enter trigger at block level is:

declare
mitem varchar2(100) := :system.mouse_item;
begin
if get_item_property(mitem, item_type) in ('BUTTON', 'TEXT ITEM') THEN
  set_item_property(mitem, font_size, get_item_property(mitem, font_size) + 2);
  set_item_property(mitem, font_weight, FONT_BOLD);
END IF;
end;

The code is written on the When-Mouse-Leave trigger at block level is:

declare
mitem varchar2(100) := :system.mouse_item;
begin
if get_item_property(mitem, item_type) in ('BUTTON', 'TEXT ITEM') THEN
  set_item_property(mitem, font_size, get_item_property(mitem, font_size) - 2);
  set_item_property(mitem, font_weight, FONT_LIGHT);
END IF;
end;

Oracle Forms Recipes eBookDownload

Change font size and weight of buttons and text items on mouse hover in Oracle forms.

Post a Comment

V. Kapoor

{picture#https://3.bp.blogspot.com/-q3wCssWUHo8/ViDFfCpPEuI/AAAAAAAAD0M/MHPvgnl3T3U/s1600/authpic.JPG} Vinish Kapoor is a Software Consultant, currently working in a reputed IT company in Noida, India and doing blogging on Oracle Forms, SQL and PLSQL topics. He is an author of an eBook Oracle Forms Recipes, which is available on Google play. {facebook#https://www.facebook.com/foxinfotech2014} {twitter#https://twitter.com/foxinfotech} {google#https://plus.google.com/u/0/+VKapoor/posts}
Fox Infotech. Powered by Blogger.