Setting the text of a text item

Hi.
I am new to forms. This must be simple! How do you set the contents of a text item programmatically at run time? I want to put the value of a parameter into a text item that appears on my form.
Thanks.

In an appropriate trigger (WHEN-NEW-FORM-INSTANCE, perhaps), you can set the value of a field on a block by simply assigning a value to it, thus:
:BLOCK.FIELD := value ;
Remember to make sure the datatypes are compatible by casting if necessary.

Similar Messages

  • Set a Text Item

    Hi,
    I have a text item. I also have an application item.
    I want to set this text item with the value of the application item every time the page is redirected.
    Is thos possible????
    How do I do this?
    Plase suggest.
    Thanks.
    Edited by: machan on Feb 9, 2010 1:03 PM

    Machan,
    You should be able to set the Text item with the value of the Application item if Source Type = "Item (Application or Page Item Name)".
    Ittichai

  • Is there a way to obtain the text item's value when the mouse pointer at?

    Hi,
    Is there a way to obtain the text item's value when the mouse pointer at? Mouse pointer may be located somewhere out of current record and even out of current block.

    There is a when-mouse-over trigger and that works fine in client-server mode for Forms 5/6/6i, but that is less indicated when deployed using Application Server.
    In that trigger you may write whatever code is necessary, restricted package procedures.
    Still, I think, for your case, if you do not have to deal with a multi-record block, you should use the HINT property for that item and set_item_property with the HINT argument for that item in order to set the hint to the item's value - this should set_item_property should be called on the when-new-record-instance .

  • Newbie iPhone: How do I programatically set the text of a UIBarButtonItem?

    Hello,
    This is probably really more of a question on IBOutlets but here goes. I want to have an updateable label on my Toolbar. A label doesn't seem to "stick" on the toolbar so I figured I would drop a UIBarButtonItem on it and then just update the Title property of it to change the text as I needed. Problem is I can't figure out how to get a reference to the UIBarButtonItem in my code.
    With a pure label control, I can drag from the File's Owner to the label in my view to make it an outlet for my ViewController and then access the text property of the label in code. With the UIBarButtonItem, I can't make it an outlet. I know the button is more of an action thing but I don't need to respond to taps, I just want to change the text.
    Thanks for any help,
    Tom

    Tom,
    You should be able to assign the UIBarButtonItem to an outlet as long as:
    1) you have defined an instance variable in FilesOwner of UIBarButtonItem and prefixed it with "IBOutlet".
    2) FilesOwner is set to your custom view controller in the Interface Builder's Inspector panel. If it still thinks it's a standard UIViewController it won't pick up your custom outlets.
    All that being said, I'm not sure you can change the title without using a custom view. The default UIBarButtonItem has an initWithTitle: initializer that may be static (perhaps others know of a way to change it once set). But you can define a custom view for the button. That gives you the ability to add a UILabel and programmatically set the text of the label.
    Cheers,
    George

  • How do you set the text of a Hyperlink component in code

    I am using Visual Web pack in NB 6.0. How do you set the text of a hyperlink component in code?
    Please see screenshots at
    http://coba.usf.edu/departments/isds/faculty/agrawal/projects/java/
    I have a hyperlink in a grid panel. I am using
    hyperlink1.setText("Hello"); in prerender(),
    but the Hyperlink shows up with the text "Hyperlink", whereas I was expecting "Hello". However,
    hyperlink1.setUrl("http://www.usf.edu"); works as expected.
    I tried nesting a static text in the hyperlink as suggested in the Creator guide (ed 2, Google project). I deleted the "Hyperlink" text in the properties editor but then the page turned out blank.
    Thanks
    Manish

    Hi Manish,
    Great to know you were able to fix your issue. The following blog entry has the list of resources you would like to look at for future.
    http://blogs.sun.com/NetBeansSupport/entry/useful_resources_for_visual_web
    Thanks
    K

  • How to set the 'text' property of a 'Header' region dynamically?

    Hi,
    I have a requirement to display the 'text' property of a 'Header' region, based on a query.
    So I need to set the text property programatically in CO.
    Can I use setText("..") by getting the handler to the 'Header' region?
    If so, How to get the handler for the 'Header' region?
    Message was edited by:
    user594528

    How to get the handler for the 'Header' region to call the setText()?
    OAHeaderBean Header1 = (OAHeaderBean)...........................
    Header1.setText("....");

  • How to set the text as an image

    Is there a way to set the text to automatically change to an image? (In preference panel, you select "Sow text imaging indicator", then there comes a yellow sign over the text, meaning that the text will be a graphic in the browser) Some text does change to a graphic but some does not. It´s very annoying cause the text sometimes changes in the browser, some don´t. So is there not a way to select which text changes to a graphic?

    Okay I made a new text box and changed the font until the little graphic appeared. Now I know, but, I also know that a lot of the font I tried would not be on someone else's computer (specially windows) but it would not have converted I guess it would have been substituted. That is really not good because the look would be very different. Should we force a conversion then to insure that it looks like what we want? Then we no longer have any text we have mostly graphics and is that not bad to be found by the search engines?
    This is so complicated!
    Mireille

  • How do you set the Text in an Accordion Interaction?

    When trying to set the text in the Accordion Interaction, it behaves very strange. You can't set it. It starts out at 13 and then changes to either 10 or 30.
    Can anyone give some advise on how to set this?
    Thanks.

    Hello,
    Logged that bug (as well, have a long list). Workaround depends on your hardware: for some scrolling the mouse wheel will allow to change font size (doesn't work for me). On my Lenovo Thinkpad I have to use the trackpad, that has a scrollbar, to change the font size. Very cumbersome, was promised that it would soon be patched, crossing my fingers.
    Lilybiri

  • Cannot enable the text item after disable it in Forms 6i

    Hi All,
    I want to enable/disable the text items depending on the value of the radio group. Since the text items and the radio group are on different tab page, so I place the following code on the WHEN-TAB-PAGE-CHANGED trigger, to do this:
    if :recordgroup ='P' then
    set_item_property(item1, ENABLED,PROPERTY_TRUE);
    set_item_property(item1, NAVIGABLE,PROPERTY_TRUE);
    elsif :recordgroup ='K' then
    set_item_property(item1, ENABLED,PROPERTY_FALSE);
    set_item_property(item1, NAVIGABLE,PROPERTY_FALSE);
    end if;
    When recordgroup is 'K', item1 is disabled, then when recordgroup has changed to 'P', item1 is still disabled.
    Both recordgroup and items are database items.
    How come like this?
    Thanks is advance,
    Vanessa

    Hi Vanessa, you must use a "when-radio-changed" trigger, and you need to know what properties of a item are afected when you change any one of this, for your problem ...
    if :recordgroup ='P' then
    set_item_property(item1, ENABLED,PROPERTY_TRUE);
    set_item_property(item1, NAVIGABLE,PROPERTY_TRUE);
    -- Add this line:
    Set_Item_property(item1, Update_Allowed, Property_True);
    elsif :recordgroup ='K' then
    set_item_property(item1, ENABLED,PROPERTY_FALSE);
    -- If you want, you can delete this line:
    set_item_property(item1, NAVIGABLE,PROPERTY_FALSE);
    end if;
    try it!
    Ruben.

  • How to Set the Text of an Onstage TextField?

    I'm trying to set an onstage TextField instance's "text" property, while maintaining embedded fonts and its onstage appearance.
    Problem Encountered: Text doesn't show up when setting text via ActionScript on an on-stage TextField w/ embedded text.
    Workaround: Create and assign a TextFormat object:
    defaultTextFormat = new TextFormat('Arial', 100, 0x000000, true, true);
    Annoyance: This defeats the purpose of styling text with the IDE.
    Possible Solution: Import the embedded font to the library and export for ActionScript?

    My problem was actually that merely setting the *text* property caused my dynamic TextField w/ embedded font to not display any text. BUT, I just re-tested this with a new file, and the problem doesn't occur. Only thing I can think of is -- my FLA was created with an older version of Flash... possibly MX 200(4?). Could this be the issue?

  • What does the "text item" mean in SD?

    what does the "text item" mean in SD?

    Is that Item Text?
    Please be clear in your questions.
    As this is your first post you should have a look at the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement].
    Also interview questions are not allowed here.
    Regards
    Karthik D

  • Which situation should we use the text item with the item category TATX

    Dear experts!
    Thank you for your attention!
    I am confused with text item (TATX).
    which situation should we use the text item with the item category TATX????
    Someone told me that the text item is dummy and should be used as a manual of certain standard item. But the manual may be a book or several papers and it also takes up some inventory not a dummy.
    So, could some body tell me what the text item (TATX) exact is and what function it has.
    Best regard!
    Tangdark

    Hi,
    you can use TATX if you like to enter a text and to print some information between the item lines.
    Regards
    William

  • Setting the text in ComboBox when nothing is selected

    Hi, I want to ask you, whether there is any possibility to set text of a JComboBox, when nothing is selected. I want something like "Choose One" to be shown when no option is selected. Thanks for any help.

    Never mind, I got it, you have tu create your own renderer and set the text for null value selected

  • Setting the text content of an Entity

    Hi all
    In some java code I'm writing, if I set the text content of an element, it wipes out any sub-elements that were there before. I just want to confirm that this is correct behavior and that I am doing this correctly. If an element has text, it can't have other children, correct?
    code from my TreeModel is below
         public void valueForPathChanged(TreePath arg0, Object arg1) {
              Object o = arg0.getLastPathComponent();
              if (o instanceof Attr) {
                   Attr attr = (Attr) o;
                   attr.setValue(arg1.toString());
                   mTree.updateUI();
              if (o instanceof Element) {
                   Element el = (Element) o;
                   //el.setNodeValue(arg1.toString());
                   el.setTextContent(arg1.toString());
                   mTree.updateUI();
              }

    I was wrong you can have text and data I had just screwed up my tree model :)

  • Setting the text on a label

    Ok, I am new to writing Java programs and I am having trouble setting the text on a label. I think I am following the syntax perfectly but my compiler wont accept it. This used to work for me then all of a sudden it didnt work.
    Here is the code that I was writing. I am trying to set the text of the Label lab1. What am I doing wrong?
    import java.awt.*;
    import java.applet.*;
    public class exer4 extends Applet
    Button but1;
    TextField txt1;
    TextField txt2;
    Label lab1;
         public void init()
         but1 = new Button("Click Me");
         add(but1);
         txt1 = new TextField(5);
         add(txt1);
         txt2 = new TextField(5);
         add(txt2);
         lab1 = new Label("This is a label");
         add(lab1);
    }

    Try this
    import java.awt.*;
    import java.applet.*;
    import java.util.*;
    public class pay extends Applet
    Button but1;
    TextField txt1;
    TextField txt2;
    Label lab1;
    public void init()
    lab1 = new Label("This is a label");
    Panel pan = new Panel();
    pan.add(lab1);
    add(pan);
    but1 = new Button("Click Me");
    add(but1);
    txt1 = new TextField(5);
    add(txt1);
    txt2 = new TextField(5);
    add(txt2);
    ps see you around

  • TabStripLayout-View: Where to set the text?

    Hello,
    I am using a view of the kind TabStrip. For your understanding> Not a normal view with a tabstrip. It is a view similar to Gridlayout, just TabStripLayout.
    I can not find where to set the text for the individual tabs, e.g. TAB1, TAB2 etc.
    Does anzbodz know?
    Regards Thank Mario

    I assume you are using a TabStrip layout of a viewset.  The tab 'captions' are set in the properties for the viewset.  In the explorer outline, expand Windows and click on the ViewSet and in the properties for the ViewSet it will have the captions listed for the tabs and you can change the text there.
    Be aware that the tab strip layout for viewsets is a bit limited.  As far as I can tell the navigation plugs between views do not work.  There are other forum questions/answers on how to use a normal TabStrip element rather than a viewset to get around this.
    -Cindy

Maybe you are looking for