Home » Developer & Programmer » Forms » Forms10g : Make Text Item not editable but clickable? (Oracle Forms10g)
Forms10g : Make Text Item not editable but clickable? [message #631697] |
Sun, 18 January 2015 23:00 |
|
rainesnowdrop
Messages: 9 Registered: January 2015 Location: Japan
|
Junior Member |
|
|
Hi all,
I want to make an item in a datablock clickable but can't be edited.
There were 5columns in a datablock, and 4 of it is Text Item and the one is a link type/clickable Display Item.
/** link type is like, FILENAME, when_mouse_clicked → attachment will be downloaded.*/
i already have the download code, but the problem is the item's physical functionalities that is non-editable/clickable item that determines the current record of clicked item.
※Case I had try:
→ I had use a Display Item, but it doesn't determine the current record of the display item I've clicked. The current record only determines where the cursor is.
→ Then I changed the Item type into Text Item, and it determines the current record when clicked, but it is editable. /**It's weird that I tried the Text Item, as it was a Text Input Field, but it's the only one that determines the current record of item when clicked.*/ I had tried to disable it but the trigger when_mouse_click was also disabled. Then tried to test some item's properties, but nothing's work.
→ I also tried to refresh when the text item has changed, but I think it will make the performance slower.
Is there a right way to solve this? Can anyone help me out?
Thanks in advance.
宜しくお願いします、
Lara
[Updated on: Sun, 18 January 2015 23:10] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: Forms10g : Make Text Item not editable but clickable? [message #631867 is a reply to message #631697] |
Wed, 21 January 2015 03:04 |
|
rainesnowdrop
Messages: 9 Registered: January 2015 Location: Japan
|
Junior Member |
|
|
Hi Wency,
Thanks for the reply.
The When_mouse_click trigger of enabled FALSE then to TRUE will be no use i think, After Mouse clicked → the original state, just came back and never seem it was disabled.
SET_ITEM_PROPERTY ( 'TESTITEM',ENABLED ,PROPERTY_FALSE);
SET_ITEM_PROPERTY ( 'TESTITEM',ENABLED ,PROPERTY_TRUE);
※The user can modify the field though.
For closure for my question, I just made the solution.
I use Pre-text-item and Post-text-item
Pre-text-item , has a temp_var that holds the original value of the field.
Post-text-item, after the user had modification to the item, the temp_var returns the original value.
Idunno if it's the rightest way to this problem, but it satisfies my prob.
どうもありがとう! for all who tries to help. (^-^)b
[Updated on: Wed, 21 January 2015 03:06] Report message to a moderator
|
|
|
|
Re: Forms10g : Make Text Item not editable but clickable? [message #631907 is a reply to message #631699] |
Wed, 21 January 2015 09:35 |
|
CraigB
Messages: 386 Registered: August 2014 Location: Utah, USA
|
Senior Member |
|
|
rainesnowdrop wrote on Sun, 18 January 2015 22:19I also had tried the Update Allowed property of Text Item to NO before but the item and it's datablock is not based on DB.
Even I set Update Allowed into No, it allows the user to type though.
I think the Update Allowed, only occur/determined that is not allowed when there is an Update command that been triggered.
In Forms 11g, with the UPDATE_ALLOWED and INSERT_ALLOWED = NO, if the user attempts to type in the field you get the message, "Field is protected from any updates." Unfortunately, I no longer have access to Forms 10g so I can't confirm it behaves the same way, but if memory serves - it does.
Have you tried the combination of both INSERT and UPDATE properties = NO?
Craig...
|
|
|
Re: Forms10g : Make Text Item not editable but clickable? [message #631918 is a reply to message #631867] |
Wed, 21 January 2015 21:14 |
|
rainesnowdrop wrote on Wed, 21 January 2015 09:04Hi Wency,
Thanks for the reply.
The When_mouse_click trigger of enabled FALSE then to TRUE will be no use i think, After Mouse clicked → the original state, just came back and never seem it was disabled.
SET_ITEM_PROPERTY ( 'TESTITEM',ENABLED ,PROPERTY_FALSE);
SET_ITEM_PROPERTY ( 'TESTITEM',ENABLED ,PROPERTY_TRUE);
※The user can modify the field though.
Have you tried it?
|
|
|
Re: Forms10g : Make Text Item not editable but clickable? [message #631996 is a reply to message #631918] |
Fri, 23 January 2015 01:06 |
|
rainesnowdrop
Messages: 9 Registered: January 2015 Location: Japan
|
Junior Member |
|
|
wency wrote on Thu, 22 January 2015 12:14Have you tried it?
wency wrote on Wed, 21 January 2015 16:03TEXT ITEM NAME = TESTITEM
WHEN-MOUSE-CLICK
code:
<<Donwload code>>
go_item(<<other column or text item>>);
SET_ITEM_PROPERTY ( 'TESTITEM',ENABLED ,PROPERTY_FALSE);
SET_ITEM_PROPERTY ( 'TESTITEM',ENABLED ,PROPERTY_TRUE);
yeah,
The TEXT_ITEM when_mouse_click = FRM-41032 USING SET ITEM PROPERTY ON CURRENT ITEM
Though that error occur, I really don't understand why you have to Enable the Item to False Then True on consecutive line?
But then, I just saw the rightest solution on my prob, which is CraigB's suggestion:
CraigB wrote on Thu, 22 January 2015 00:35In Forms 11g, with the UPDATE_ALLOWED and INSERT_ALLOWED = NO, if the user attempts to type in the field you get the message, "Field is protected from any updates." Unfortunately, I no longer have access to Forms 10g so I can't confirm it behaves the same way, but if memory serves - it does.
Have you tried the combination of both INSERT and UPDATE properties = NO?
Craig...
It works! Thanks by the way. (^-^)b
|
|
|
|
Goto Forum:
Current Time: Sun Feb 02 11:02:25 CST 2025
|