enter_query when clicking on image (and not a button) [message #385330] |
Mon, 09 February 2009 02:36 |
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 #385538 is a reply to message #385330] |
Tue, 10 February 2009 01:14 |
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 #385642 is a reply to message #385330] |
Tue, 10 February 2009 06:13 |
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 #385667 is a reply to message #385330] |
Tue, 10 February 2009 08:16 |
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,
|
|
|