Home » Developer & Programmer » Forms » setting text value at run time to a text item in a data base block
setting text value at run time to a text item in a data base block [message #82826] Tue, 08 July 2003 03:56 Go to next message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi,
I need to set text value at run time for the text box in a data block.
I dont know which property to be used for set_item_property?.
Please guide me...

Thanks
~V~
Re: setting text value at run time to a text item in a data base block [message #82828 is a reply to message #82826] Tue, 08 July 2003 05:14 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
No need for the Set_Item_Property. Just assign the value to the text item.
-- Some trigger/program unit text
Declare
  ....
Begin
  ...
  :your_block.your_item := 'ENTER SOME TEXT HERE.';
  ...
End;
MHE
Re: setting text value at run time to a text item in a data base block [message #82830 is a reply to message #82828] Tue, 08 July 2003 05:58 Go to previous messageGo to next message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi,
Thanks a lot...But i need to set the text box value at run time differently...But i can`t use set_item_instance_property also...

~V~
Re: setting text value .... [message #82831 is a reply to message #82830] Tue, 08 July 2003 06:28 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Search for the appropriate trigger to set the item. Let's say your text item (txt_message) is dependent on a checkbox (chk_ok) in the same block. Then you would create a when-validate-item trigger on the checkbox with some code like:
Begin
  -- If the checkbox is checked, put a text in the text item
  If CheckBox_Checked('my_block.chk_ok') Then
    :myblock.txt_message := 'checkbox is checked';
  Else -- put another text in the text item
    :myblock.txt_message := 'The checkbox is not checked now.';
  End if;
End;
You see,
all depends on WHEN you want your text item to be filled. If you can give that information (i.e. when it should change, dependent on what items, after a query...), I'm sure a suitable solution will come up....

MHE
Previous Topic: designing radio_buttons in datablock
Next Topic: Change Insert message
Goto Forum:
  


Current Time: Sat Mar 02 20:06:39 CST 2024