Home » Developer & Programmer » Forms » enter_query when clicking on image (and not a button) (oracle forms 6i, windows XP)
enter_query when clicking on image (and not a button) [message #385330] Mon, 09 February 2009 02:36 Go to next message
xinea
Messages: 7
Registered: February 2009
Junior Member
hi,

i've developed an horizontal toolbar based on images which act like buttons. I set the WHEN-IMAGE-PRESSED trigger for each image and it works fine for "add new record", "delete", "clear", "print" ... except for enter-query, execute and cancel query. When i click on image (enter-query), i enter the query mode, but could not go out of it when clicking on execute-query. It always shows the following message:
>> Enter a query; press F8 to execute, Ctrl+q to cancel <<
When i try to close the form, it executes the query and give me the results.
So what are the steps to follow in order to execute_query/abort_query when image pressed?

Thanks in advance,

Rgds

[Updated on: Mon, 09 February 2009 02:48]

Report message to a moderator

Re: enter_query when clicking on image (and not a button) [message #385505 is a reply to message #385330] Mon, 09 February 2009 23:22 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you considered using 'buttons'?

On which block are these 'images' listed? Is this block a non-database block?

David
Re: enter_query when clicking on image (and not a button) [message #385538 is a reply to message #385330] Tue, 10 February 2009 01:14 Go to previous messageGo to next message
xinea
Messages: 7
Registered: February 2009
Junior Member

- I don't want to use buttons because i cannot make their borders invisible and make the button look like plain item. I need to set buttons border's bevel to none. So i chose to use images.
- These images are listed in one block which is a non-database block.

Thx

Rgds,
Re: enter_query when clicking on image (and not a button) [message #385606 is a reply to message #385330] Tue, 10 February 2009 04:19 Go to previous messageGo to next message
cookiemonster
Messages: 13963
Registered: September 2008
Location: Rainy Manchester
Senior Member
What's the code in the execute query WHEN-IMAGE-PRESSED?
Is it getting executed at all - i.e. if you put a message at the top of the trigger do you see the message?
If you press the execute query without going into enter query mode first does it work?

EDIT: added last question

[Updated on: Tue, 10 February 2009 04:25]

Report message to a moderator

Re: enter_query when clicking on image (and not a button) [message #385642 is a reply to message #385330] Tue, 10 February 2009 06:13 Go to previous messageGo to next message
xinea
Messages: 7
Registered: February 2009
Junior Member
- Execute query W-I-P trigger code:
if :System.Mode != 'NORMAL' then
do_key('execute_query');
end if;

- The code is not executed when image pressed. I inserted a message('w-i-p execute_query');pause; @ the top of the above code but could not see this message when pressing on the execute query image.
- If i press the execute query without going into enter query mode, it does not work (as if the image was not pressed @ all).[if i add a message();pause; @ the top of the trigger, i see the message but nothing happens after it]

Thanks

Rgds,

EDIT: [] added

[Updated on: Tue, 10 February 2009 06:23]

Report message to a moderator

Re: enter_query when clicking on image (and not a button) [message #385652 is a reply to message #385330] Tue, 10 February 2009 07:21 Go to previous messageGo to next message
cookiemonster
Messages: 13963
Registered: September 2008
Location: Rainy Manchester
Senior Member
That says to me that forms is trying to change datablock when you click on the execute-query image, and forms won't let you change datablock while in enter-query mode.
I'm afraid you need to rethink your approach.
Re: enter_query when clicking on image (and not a button) [message #385667 is a reply to message #385330] Tue, 10 February 2009 08:16 Go to previous message
xinea
Messages: 7
Registered: February 2009
Junior Member
ok.
You're right about changing my approach especially that i'm facing other problems while using images. For example, if i click many times on the image, i can see many squares drew on the image. Plus, if, by fault, i double click the image, i loose the position of the cursor on the form.

For all these reasons, i'll try to use the horizontal menu toolbar (which has its buttons look like images when mouse is away, and look like buttons when the mouse is moved across it) created while creating a menu .

Thanks alot for your replies.

Rgds,
Previous Topic: Limitation of NVARCHR2 in Cursor
Next Topic: CAN I MAKE OMR SHEET BY USING REPORT 6i TOOL
Goto Forum:
  


Current Time: Mon Feb 03 18:14:58 CST 2025