Home » Developer & Programmer » Forms » change height of text field (oracle form 6i)
change height of text field [message #614265] Tue, 20 May 2014 04:01 Go to next message
gr8harismalik
Messages: 5
Registered: May 2014
Location: Lahore
Junior Member
i want to change the height of text field at runtime when mouse click on the text field, my code is:

IF :SYSTEM.CURRENT_ITEM = 'REMARKS' THEN
SET_ITEM_PROPERTY('VISITS.REMARKS', CURRENT_RECORD, HEIGHT, 30);
ELSE
SET_ITEM_PROPERTY('VISITS.REMARKS', CURRENT_RECORD, HEIGHT, 16);
END IF;

but i got an error
FRM-41042: No such property for Set_Item_Property...

any other way to solve this problem....??

[Updated on: Tue, 20 May 2014 04:04]

Report message to a moderator

Re: change height of text field [message #614268 is a reply to message #614265] Tue, 20 May 2014 04:15 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Open Forms Online Help System and search for SET_ITEM_PROPERTY. It lists all the properties you are allowed to modify at runtime (i.e. you don't need to guess whether some property exists or not).
Re: change height of text field [message #614269 is a reply to message #614265] Tue, 20 May 2014 04:16 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
You seem to be confusing set_item_property and set_item_instance_property. Current_record is meaningless for set_item_property.
Re: change height of text field [message #614273 is a reply to message #614269] Tue, 20 May 2014 04:23 Go to previous messageGo to next message
gr8harismalik
Messages: 5
Registered: May 2014
Location: Lahore
Junior Member
i also check this code with SET_ITEM_INSTANCE_PROPERTY but i got a same error...
Re: change height of text field [message #614274 is a reply to message #614273] Tue, 20 May 2014 04:27 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
And if you check the form builder help topic for set_item_instance_property you'll see it can't modify height. Set_item_property can, if you supply the correct parameters.
Re: change height of text field [message #614278 is a reply to message #614274] Tue, 20 May 2014 04:41 Go to previous messageGo to next message
gr8harismalik
Messages: 5
Registered: May 2014
Location: Lahore
Junior Member
can you give me an example....??
Re: change height of text field [message #614282 is a reply to message #614278] Tue, 20 May 2014 04:52 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
There's examples in the form builder help topic.
Re: change height of text field [message #614285 is a reply to message #614282] Tue, 20 May 2014 05:12 Go to previous messageGo to next message
gr8harismalik
Messages: 5
Registered: May 2014
Location: Lahore
Junior Member
i didn't find example, so please help me out...
Re: change height of text field [message #614288 is a reply to message #614285] Tue, 20 May 2014 05:25 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
Seriously?
The start of the help topic lists all the different ways you can call set_item_property with the full parameter lists.
Below that it explains what each parameter is and what values you can use.
At the end is actual examples of how to call it.
The help topic is as comprehensive as anyone can possibly need.
I suggest you take some time to read it.
If there's a particular point you don't understand don't hesitate to ask, but everything you need is there.
Re: change height of text field [message #614389 is a reply to message #614265] Wed, 21 May 2014 04:45 Go to previous message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Since you are setting the properties of the Item and not an Instance of and Item, you do not pass the CURRENT_RECORD value to the SET_ITEM_PROPERTY() built-in. This variable is only valid with the Set_Item_Instance_Property() built-in. Consequently, by changing the height of the item using Set_Item_Property() you will be changing the height of ALL instances of the Item.
If you need to change the height of just one instance of the item, I'm afraid you can't do this. The typical work-around for this would be to create a Visual Attribute (VA) object and then assign the VA to the item during run time, but when I tested this, the "Add Property" button in the VA Property Pallet was disabled otherwise I would have suggested you add the Height property to the VA. Here is the problem with changing the height of just one instance of an item in a multi-record block - Forms would have to increase the spacing between the rest of the items in the row in order to accomodate the new height of the item or Forms would have to display the new height by overlaying the item on corresponding items in preceding and subsequent rows.

Perhaps you could display the text in your Text-Item in a Tooltip (bubble hint) or in a display text item instead of changing the height of your text-item object.
Previous Topic: Oracle Error 00904
Next Topic: d2k 6i default menu .mmb file required
Goto Forum:
  


Current Time: Wed May 01 18:32:16 CDT 2024