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 Go to next message
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 #631698 is a reply to message #631697] Sun, 18 January 2015 23:07 Go to previous messageGo to next message
jgjeetu
Messages: 373
Registered: July 2013
Location: www.Orafaq.com/Forum
Senior Member

set update allowed property of text item to no, maybe this will help .
Re: Forms10g : Make Text Item not editable but clickable? [message #631699 is a reply to message #631698] Sun, 18 January 2015 23:19 Go to previous messageGo to next message
rainesnowdrop
Messages: 9
Registered: January 2015
Location: Japan
Junior Member
I 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.
Re: Forms10g : Make Text Item not editable but clickable? [message #631708 is a reply to message #631699] Mon, 19 January 2015 01:23 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How about using a button instead of other kinds of items?
Re: Forms10g : Make Text Item not editable but clickable? [message #631718 is a reply to message #631708] Mon, 19 January 2015 02:02 Go to previous messageGo to next message
rainesnowdrop
Messages: 9
Registered: January 2015
Location: Japan
Junior Member
I also tried the button, but then, they want the item to be a link type, which is different filename is displayed on every row, but then button label if changed on runtime, all the buttons in that column change its label the same.

it supposed to have this:
FILENAME
a.txt
b.txt
c.txt

but the button change property label display like this: when loop through the datablock:
FILENAME
a.txt
a.txt
a.txt

if the button's label is possible to have different labels and I just made it in wrong way, please help me out.
Re: Forms10g : Make Text Item not editable but clickable? [message #631722 is a reply to message #631718] Mon, 19 January 2015 02:49 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Ouch! Right, that was my mistake. All items get the same label.

Why do you need to display file name? Would buttons with the "Download" label do any good? You'd know which file you have to download anyway, wouldn't you?
Re: Forms10g : Make Text Item not editable but clickable? [message #631723 is a reply to message #631722] Mon, 19 January 2015 03:04 Go to previous messageGo to next message
rainesnowdrop
Messages: 9
Registered: January 2015
Location: Japan
Junior Member
Yeah, at first it is designed to have a download button, but then, they wanted it to be directly downloaded if the Filename on Attachment column is clicked.
At this moment, I'm trying to look for solution before I appeal that there's no way.
Re: Forms10g : Make Text Item not editable but clickable? [message #631862 is a reply to message #631723] Wed, 21 January 2015 01:03 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

TEXT 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);
Re: Forms10g : Make Text Item not editable but clickable? [message #631867 is a reply to message #631697] Wed, 21 January 2015 03:04 Go to previous messageGo to next message
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 #631869 is a reply to message #631867] Wed, 21 January 2015 03:15 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This solution is OK if you confiscate user's mouse. Otherwise, if he navigates to an item which has the "mouse navigate" property set to OFF, those triggers won't fire and nothing will happen. For more info, see Forms Online Help.
Re: Forms10g : Make Text Item not editable but clickable? [message #631907 is a reply to message #631699] Wed, 21 January 2015 09:35 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
rainesnowdrop wrote on Sun, 18 January 2015 22:19
I 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 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

rainesnowdrop wrote on Wed, 21 January 2015 09:04
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.




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 Go to previous messageGo to next message
rainesnowdrop
Messages: 9
Registered: January 2015
Location: Japan
Junior Member
wency wrote on Thu, 22 January 2015 12:14
Have you tried it?
wency wrote on Wed, 21 January 2015 16:03
TEXT 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:35
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...


It works! Thanks by the way. (^-^)b
Re: Forms10g : Make Text Item not editable but clickable? [message #632023 is a reply to message #631996] Fri, 23 January 2015 08:31 Go to previous message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Glad I could help. Thanks for sharing the solution!

Craig...
Previous Topic: How to change width of a column in Oracle Forms at run time
Next Topic: Different language change in oracle form at run time
Goto Forum:
  


Current Time: Wed Apr 24 06:45:18 CDT 2024