Home » Developer & Programmer » Forms » Change a display item at run time
Change a display item at run time [message #301810] Thu, 21 February 2008 17:34 Go to next message
babuanna
Messages: 28
Registered: October 2007
Junior Member
Hi All,

I have a form that has a display item say "employee_name". I do not want to change it to a text item. But I want the navigation to move to the display item . I mean, I would like the cursor to be positioned in the display item - employee_name.

How can I do it?

Forms help says that End users cannot navigate to display items or edit display item values.

Please help.

Thanks for your reply in advance.
Re: Change a display item at run time [message #301817 is a reply to message #301810] Thu, 21 February 2008 18:18 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please rethink what you are asking.
You have said:
I have a form that has a display item say "employee_name". I do not want to change it to a text item. But I want the navigation to move to the display item . I mean, I would like the cursor to be positioned in the display item - employee_name.

Do you actually mean "I want to navigate to a field but I don't want the user to be able to change the value". If so, then make the item a 'text' item but make its properties 'Insert Allowed' and 'Update Allowed' both ''No'.

David
Re: Change a display item at run time [message #301818 is a reply to message #301810] Thu, 21 February 2008 18:38 Go to previous messageGo to next message
babuanna
Messages: 28
Registered: October 2007
Junior Member
I have an existing form that has a display item. I need the cursor to navigate to it.

This is because the existing code is programmed in such a way that if the CurItem := Name_In( 'SYSTEM.CURSOR_ITEM' ); then do something.

I know that it is not possible to navigate to a display item . I also did not want it to change to a text item just in case it upsets something else on the form.

So, I was trying to see if it possible to convert the display item programatically through run time to a navigable item.

I like your suggestion of making it into a text item but setting its properties "Insert Allowed" and "update Allowed" as "No" ..Would this simulate a display item except for the fact that it is navigable?

Please also mention the difference between a text item and a display item.

Thanks in advance
Re: Change a display item at run time [message #301819 is a reply to message #301818] Thu, 21 February 2008 18:45 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Definitions:
display item
- A read-only text box whose value must be fetched or assigned programmatically. Operators cannot navigate to a display item or edit the text it contains.

text item
- A single- or multi-line text box that supports a variety of data types, format masks, and editing capabilities

I am confident that making the field a 'text item' with 'insert' and 'update' properties 'no' would be acceptable.

Give it a go and see what results you get.

David

[Updated on: Thu, 21 February 2008 18:46]

Report message to a moderator

Re: Change a display item at run time [message #301828 is a reply to message #301810] Thu, 21 February 2008 22:46 Go to previous message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
Dear Friend,

As Mr. David said, "make the item a 'text' item but make its properties 'Insert Allowed' and 'Update Allowed' both ''No'". I agree with him.
In addition to this I would also suggest that you should also change the background colour of your text item to gray so that it feels like this item cannot be updated.

Regards,
Azam Khan
Previous Topic: Unable to run reports
Next Topic: Not getting the FRM- 40200 Message
Goto Forum:
  


Current Time: Thu Dec 08 08:11:18 CST 2016

Total time taken to generate the page: 0.07420 seconds