Home » Developer & Programmer » Forms » Changing Color of a push button when mouse over
Changing Color of a push button when mouse over [message #226284] Fri, 23 March 2007 03:04 Go to next message
ShaShalini
Messages: 59
Registered: January 2007
Member
Hi

Can anybody tell me how I can change the color of a push button when user places his mouse over the push button .

I have been able to change the color after pressing the button.

I want the push button to be highlighted when user palces his mouse on it ..


Thanks
Shalini
Re: Changing Color of a push button when mouse over [message #226887 is a reply to message #226284] Mon, 26 March 2007 18:27 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you tried placing code in the When-Mouse-Enter trigger for that button.

David
Re: Changing Color of a push button when mouse over [message #227343 is a reply to message #226887] Wed, 28 March 2007 01:29 Go to previous messageGo to next message
ShaShalini
Messages: 59
Registered: January 2007
Member
My code was placed on the trigger when-mouse-click , I changed it to when-mouse-enter but still that does not work ..


Thanks
Re: Changing Color of a push button when mouse over [message #227636 is a reply to message #227343] Wed, 28 March 2007 19:45 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Did you have a 'synchronize'? Please post your code.

David
Re: Changing Color of a push button when mouse over [message #227792 is a reply to message #226284] Thu, 29 March 2007 07:28 Go to previous messageGo to next message
ShaShalini
Messages: 59
Registered: January 2007
Member
Hi

here is the code that is found in the when-mouse-enter trigger

if :SYSTEM.MOUSE_ITEM = 'BLOCK1.BUTTON1' then
set_item_property('BUTTON1',BACKGROUND_COLOR, 'r191g223b191');
end if;

thanks
Re: Changing Color of a push button when mouse over [message #227859 is a reply to message #227792] Thu, 29 March 2007 19:11 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Okay, you do NOT have a 'synchronize'.

Try
if :SYSTEM.MOUSE_ITEM = 'BLOCK1.BUTTON1' then 
  set_item_property('BUTTON1',BACKGROUND_COLOR, 'r191g223b191');
  synchronize;
end if;

David
Re: Changing Color of a push button when mouse over [message #343807 is a reply to message #227859] Thu, 28 August 2008 04:06 Go to previous messageGo to next message
myclassic
Messages: 127
Registered: December 2006
Location: Pakistan
Senior Member
djmartin wrote on Thu, 29 March 2007 19:11
Okay, you do NOT have a 'synchronize'.

Try
if :SYSTEM.MOUSE_ITEM = 'BLOCK1.BUTTON1' then 
  set_item_property('BUTTON1',BACKGROUND_COLOR, 'r191g223b191');
  synchronize;
end if;

David



Dear Sir

I am using Forms [32 Bit] Version 10.1.2.0.2 (Production)

But mouse Triggers are not working?
I am sending you a .fmb, please do it for me.

Regards.
Re: Changing Color of a push button when mouse over [message #344718 is a reply to message #343807] Mon, 01 September 2008 01:57 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Sorry, they are right. Searching OTN for 'when-mouse-enter not working' returned "Oracle9i Forms, Migrating Client/Server To the Web, An Oracle White Paper, April 2002" at http://www.oracle.com/technology/products/forms/pdf/forms9icstowebmigration.pdf

I googled 'when-mouse-enter java' and found http://www.araboug.org/ib/lofiversion/index.php/t27010.html

I hope this helps you.

David
Re: Changing Color of a push button when mouse over [message #409469 is a reply to message #344718] Mon, 22 June 2009 18:20 Go to previous messageGo to next message
nastyjillu
Messages: 211
Registered: February 2009
Senior Member
Hi David,

i have a list item(poplist). there is a when-mouse-enter trigger for this item.
a procedure is being called in thhis trigger to populate the item.

but this is not working as you said when-mouse-enter trigger doesnt work in web deployed forms ( as per link you have sent).

i wrote the same code in when-new-item-inst trigger of that item. but when i click for first time,its showing default value of the item.when i again click on the item its getting populated. i dont want this. whenever i click on the item the list should be populated.

what trigger should i use??

thanks
jillu
Re: Changing Color of a push button when mouse over [message #409566 is a reply to message #409469] Tue, 23 June 2009 02:20 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Why don't you use a record_group and an LOV associated with the item?

David
Re: Changing Color of a push button when mouse over [message #409971 is a reply to message #409566] Wed, 24 June 2009 11:03 Go to previous messageGo to next message
nastyjillu
Messages: 211
Registered: February 2009
Senior Member
we are calling a form for the LOV. i cant change it to record group.

i wrote the same code in when-mouse-click trigger. it works now.

Re: Changing Color of a push button when mouse over [message #410646 is a reply to message #409971] Mon, 29 June 2009 08:37 Go to previous message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

try WHEN-LIST-ACTIVATED , WHEN-LIST-CHANGED
Previous Topic: Help with ImageList and Treeview in comctl32.ocx
Next Topic: oracle forms and reports (merged 2) - 10g
Goto Forum:
  


Current Time: Sun Dec 04 06:33:33 CST 2016

Total time taken to generate the page: 0.08180 seconds