Home » Developer & Programmer » Forms » Is it possible to disable mouse navigation on data block or text item (Oracle Developer, 9i, Windows XP)
Is it possible to disable mouse navigation on data block or text item [message #516122] Fri, 15 July 2011 02:59 Go to next message
neno
Messages: 3
Registered: July 2011
Location: Bosnia and Herzegovina
Junior Member
Hello,

I am trying to disable mouse navigation on data block or text item,. What i want is to my text items in specified block be keyboard navigable only.
I have already "googled" for answer and searched on this forum but with no luck.

Most answers i found was to change Mouse Navigate option and set it to No in Navigation section in Property Pallete.
The problem is that i don't have that option on text_items or data block (my conclusion: probably because it is not possible to change mouse navigate option for text item or data block).

But i am not convinced that is the case. So i am asking you for help.

I have also tried in WHEN-NEW-BLOCK-INSTANCE trigger
set_item_property('block.item', mouse_navigate, property_false)
and
set_block_property('block', mouse_navigate, property_false)
and of course it did not work.

Thank you in advance.
Re: Is it possible to disable mouse navigation on data block or text item [message #516128 is a reply to message #516122] Fri, 15 July 2011 03:13 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In Object Navigator, select the form itself. Check its Property Palette window. In there, under the Navigation node, you'll see the Mouse Navigation Limit property. It is set to "Form" by default. Now, if you change it to Item, this willOracle Forms Help

prevent end users from navigating out of the current item. This setting prevents end users from navigating with the mouse at all.

Would that be OK?

For other options, check Forms Help for that property.

If none of those helps, you might be out of luck; as you already know, there's no mouse navigate property for text items. *Maybe* there's an option to do that using Java beans, but I really wouldn't know how to do that.
Re: Is it possible to disable mouse navigation on data block or text item [message #516151 is a reply to message #516128] Fri, 15 July 2011 04:31 Go to previous messageGo to next message
neno
Messages: 3
Registered: July 2011
Location: Bosnia and Herzegovina
Junior Member
That option does not suit me because i have data block (part of form) where i must have enabled mouse movement through fields. I will try to find different solution for my problem.

But,in any case, thank you very much for quick replay and your answer.

Best regards

Re: Is it possible to disable mouse navigation on data block or text item [message #516246 is a reply to message #516151] Fri, 15 July 2011 13:06 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
What if you set the ENABLED property to NO at WHEN-NEW-RECORD-INSTANCE, and then programmatically set it to YES on say the POST-TEXT-ITEM of the previous field, then set it back to NO after leaving the field?

Unless I am not understanding the scenario you seek, which is possible because I do feel dumb today. It's been a weird day over here.
Re: Is it possible to disable mouse navigation on data block or text item [message #516259 is a reply to message #516246] Fri, 15 July 2011 14:27 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
neno
What i want is to my text items in specified block be keyboard navigable only.

Why? If you could explain the problem, someone might get the idea and provide a workaround (or convince you that your wishes are surreal).
Re: Is it possible to disable mouse navigation on data block or text item [message #516315 is a reply to message #516259] Sat, 16 July 2011 09:58 Go to previous message
neno
Messages: 3
Registered: July 2011
Location: Bosnia and Herzegovina
Junior Member
Do not worry I have already find different solution to my problem.

Problem that i had at first sight was not appeared complicated but it turned out that it is. What i needed to do was to prevent data manipulation, which means i had to set option set_item_property('block.item', enabled, property_false) on some text items. To easier explain imagine following situation:

I have 5 fields(all text_item)

A B C D E

If C is not null
then
set_item_property('block.A', enabled, property_false)
set_item_property('block.B', enabled, property_false)
set_item_property('block.C', enabled, property_false)

set_item_property('block.D', enabled, property_true)
set_item_property('block.E', enabled, property_true)

else
set_item_property('block.A', enabled, property_true)
set_item_property('block.B', enabled, property_true)
set_item_property('block.C', enabled, property_true)

set_item_property('block.D', enabled, property_false)
set_item_property('block.E', enabled, property_false)

end if;

if D is not null and E is not null
then
set_item_property('block.A', enabled, property_false)
set_item_property('block.B', enabled, property_false)
set_item_property('block.C', enabled, property_false)

set_item_property('block.D', enabled, property_false)
set_item_property('block.E', enabled, property_false)
end if;

Like you see, the problem was when user click from third record (for example) on first (for first record - fields A,B,C were entered, but for third record are not entered) cursor will be placed on (for example) field A (but for first record field A have set_item_property('block.A', enabled, property_false)), so it try to change item proprty of field where cursor is set, which gives us an error.

Solution:

I put a new field in front of field A (field Z which had update property disabled) so user could click on that field and property of other items could execute whitout errors. But problem remain when user use mouse and click from third on first record on other field A, B, C,D or E (that is the reason why i wanted to items be keyboard navigable only, so users could move between record only through field Z). And i solved this problem sending the cursor on field Z regardless if the user tried to set coursor (with mouse) on other fields.

I hope you understand me and thank you once again for quick response ( I would probably still looking for answer how to change item property to mouse_navigate, false).
Previous Topic: Need utility that seaches multiple Oracle Forms for string.
Next Topic: Calculation in timing wth Varchar2 Datatype
Goto Forum:
  


Current Time: Sun Sep 08 23:05:31 CDT 2024