change height of text field [message #614265] |
Tue, 20 May 2014 04:01 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/266e7c54d3faadc321ea68dae9dd9c8b?s=64&d=mm&r=g) |
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 #614274 is a reply to message #614273] |
Tue, 20 May 2014 04:27 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 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 #614288 is a reply to message #614285] |
Tue, 20 May 2014 05:25 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 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 Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.gravatar.com/avatar/a59247482a11edb9544247f102223e8d?s=64&d=mm&r=g) |
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.
|
|
|