Text field top padding

Hello,
I got a problem customizing the text fields in the form I created. There seems to be a top padding which I cannot remove, forcing to give them much more height than it seems to be neccessary to display the text in them. Because this is stealing a lot of space I want to reduce that padding, but I cannot figure out how. Here is a screen shot of one of them. You can see there is a lot of space on top of the submitted text:
If I reduce the height of the field the text will get cropped at the bottom. There is enough space at the top, so I should fit:
Reducing the size of the text is making it very hard to read I think:
Setting the text size to auto is resulting in cropped text also.
It would be nice if you could help me out here.
Thanks for your time.
Edit: I am using Adobe Acrobat X Pro.

I am having the same problem with excessive padding at the top of my form fields.  It's not quite as drastic as Pratzelwurm's, but there is obvious padding.  It looks like it's about 3pts on a 9pt Arial font for single line, and 6pts for multi-line.  While I did generate the pdf with a 3rd party program (scribus), I created another textfield in Acrobat 11 next to the one in question, and the vertical padding was the same—the only difference was that Acrobat had added horizontal padding as well. 
As you see in the screenshot, for single-line fields it's just ugly, which, though I'd rather not, I can work around, but for multi-line fields, it's a serious issue.  I've spent about 6 or seven hours now scouring the internet, and I have yet to come across any solutions for this problem.  Please let me know if anyone has figured out any solutions in the few years since this last post (aside from the obvious "change your form layout" or "don't use multi-line fields" and such).  Thank you!

Similar Messages

  • Adding user-defined number of text fields.

    Okay I am having problems, obviously. I am developing a program where the user will enter X and Y values and the program will calculate the relational data. However, I can't even get a start.
    First of all, the user defines the number of pairs of points they want to define. For example, they have 20 points, each with its own X and Y, so they click on 20 and then okay in the first window.
    The next window will then take their answer and display X and Y text fields for as many points as they defined. However, I can't figure out any way to do this.
    Feel free to run the program, the problem lies in the method setTextFields(). Help please!
    import javax.swing.*;               //FOR SWING COMPONENT CLASSES
    import java.awt.*;                  //FOR CONTAINER CLASS
    import java.awt.event.*;            //FOR EVENT HANDLING
    public class RegressInput extends JFrame
        private JComboBox listJComboBox;        //COMBO BOX TO HOLD HOW MANY PAIRS OF DATA POINTS THE USER HAS TO ENTER
        private JButton answerButton;           //BUTTON TO CLICK AFTER SELECTING PAIRS OF DATA POINTS
        private JPanel textFieldTopPanel;       //TEXT FIELD TOP PANEL
        private JPanel textFieldBottomPanel;    //TEXT FIELD BOTTOM PANEL
        private JPanel textFieldPanel;           //TEXT FIELD PANEL   
        private CardLayout cardSelector;        //DECLARE CARD LAYOUT OBJECT   
        private JPanel cardDeck;                //DECLARE CARD PANEL OBJECT
        public RegressInput(String title)
            super(title);               //CALL SUPERCLASS CONSTRUCTOR
            //CREATE A CONTAINER
            Container container = getContentPane();
            //INSTANTIATE CARD LAYOUT OBJECT
            cardSelector = new CardLayout();
            //INSTANTIATE PANEL OBJECT
            cardDeck = new JPanel();
            //SET LAYOUT OF CARD DECK PANEL TO CARD LAYOUT
            cardDeck.setLayout(cardSelector);
            //DEFINE LABEL FOR FIRST CARD
            Label question = new Label("How many PAIRS of data would you like to enter?");
            //BUTTON TO SUBMIT NUMBER OF POINTS TO PLOT
            answerButton = new JButton("OK");
            listJComboBox = new JComboBox( getArray() );//USE getArray() METHOD TO SET ITEM LIST OF THE COMBO BOX
            listJComboBox.setMaximumRowCount(10);       //SETS THE VISIBLE NUMBER OF ITEMS TO THE USER
            Label xValues = new Label("X Values");      //LABEL FOR X values
            Label yValues = new Label("Y Values");      //LABEL FOR Y values
            //BUILD CARD DECK
            JPanel comboBoxCard = new JPanel();     //CREATE FIRST CARD
            comboBoxCard.add(question);             //ADD question LABEL TO FIRST CARD
            comboBoxCard.add(listJComboBox);        //ADD listJComboBox TO FIRST CARD
            comboBoxCard.add(answerButton);         //ADD answerButton TO FIRST CARD
            textFieldTopPanel = new JPanel();       //CREATE TOP PANEL OF SECOND CARD
            textFieldTopPanel.add(xValues);         //ADD xValues Label TO SECOND CARD
            textFieldTopPanel.add(yValues);         //ADD yValues Label TO SECOND CARD
            textFieldBottomPanel = new JPanel();    //CREATE BOTTOM PANEL OF SECOND CARD
            textFieldBottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));    //SET LAYOUT FOR BOTTOM PANEL
            textFieldPanel = new JPanel();          //CREATE PANEL FOR SECOND CARD
            textFieldPanel.setLayout(new BorderLayout(10, 10)); //SET LAYOUT FOR SECOND CARD
            textFieldPanel.add(textFieldTopPanel, "North"); //ADD textFieldTopPanel TO NORTH
            textFieldPanel.add(textFieldBottomPanel, "South");  //ADD textFieldBottomPanel TO SOUTH
            cardDeck.add(comboBoxCard, "Step 1");       //ADD FIRST CARD TO DECK
            cardDeck.add(textFieldPanel, "Step 2");     //ADD SECOND CARD TO DECK
            container.add(cardDeck);                    //ADD CARD DECK TO CONTAINER
            //DEFINE BUTTON HANDLER OBJECT
            ButtonHandler buttonHandler = new ButtonHandler();
            //ADD ACTION LISTENER FOR BUTTONS
            answerButton.addActionListener(new ButtonHandler());
        }//END RegressInput() CONSTRUCTOR
        //METHOD TO CREATE AND RETURN AN ARRAY OF VALUES FOR JComboBox
        private String[] getArray()
            //CREATE ARRAY TO HOLD 30 VALUES
            int numbers[] = new int[29];
            //CREATE int IN ORDER TO START THE ARRAY AT 2 INSTEAD OF 1
            int number = 2;
            //ASSIGN VALUES FROM 2 TO 30 TO numbers[] ARRAY
            for(int count=0; count < 29; ++count)
                numbers[count] = number;        //SETS EACH INDEX TO number
                number++;                       //INCREMENTS number
            }//END for LOOP
            //CREATE pairs[] ARRAY TO HOLD 30 STRINGS
            String pairs[] = new String[29];
            //ASSIGN VALUES 1 TO 30 IN STRING ARRAY FOR COMBO BOX
            for(int count = 0; count < 29; ++count)
                pairs[count] = "" + numbers[count];
            }//END for LOOP
            return pairs;//RETURNS pairs[] ARRAY FOR THE LIST ITEMS IN listJComboBox
        }//END getArray() METHOD8
        //RETURNS THE ITEM SELECTED BY THE USER FROM THE JComboBox
        private int getValue()
            //ASSIGNS STRING VALUE OF THE JComboBox TO A WRAPPER
            Integer v = new Integer((String) listJComboBox.getSelectedItem());
            //ASSIGNS WRAPPER VALUE TO int
            int value = v.intValue();
            //RETURN VALUE OF SELECTED ITEM
            return value;
        }//END getValue()
        private void setTextFields()
        {//HERE LIES THE PROBLEM! WHAT GOES IN THIS METHOD????
            for(int count = 0; count < (2 * getValue()); ++count)
        }//END setTextFields()
        //BUTTON EVENT HANDLER CLASS
        private class ButtonHandler implements ActionListener
         //PROCESS EVENT
            public void actionPerformed(ActionEvent e)
                //WHICH BUTTON CAUSED THE EVENT?
                if(e.getSource() == answerButton)
                    cardSelector.last(cardDeck);
                    cardDeck.setSize(600,600);
                }//END if STATEMENT
            }//END actionPerformed()
        }//END ButtonHandler CLASS
    }//END RegressInput CLASSHere is main:
    import javax.swing.JFrame;
    public class TestSharpStats
         public static void main(String[] args)
            //DEFINE FRAME OBJECT
            RegressInput window = new RegressInput("Hi");     //SETS TITLE BAR
            window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);      //CLOSES WINDOW
            window.setSize(400, 600);    //SET FRAME SIZE
            window.setResizable(true);  //PREVENTS USER FROM RESIZING WINDOW
            window.setVisible(true);     //SETS window TO VISIBLE
        }//END main()
    }//END TestSharpStats CLASS

    muit-post: http://forum.java.sun.com/thread.jspa?messageID=4442652

  • How do you change the lenght of the text field in fb50?

    Hi,
    In the transaction FB50  , the long text field In the item line  is not showing the whole description written in the text field (word pad).when viewing the item  details it is showing ony half description.How do we increase the field size?

    Are you Talking about G/L account short text in the Item Level ? If yes
    Standard Text Field  20 character Length" The G/L account short text is used for online displays and evaluations which do not have sufficient space for the long text."
    Kanagaraja L
    Edited by: Kanagaraja  Lokanathan on Jul 15, 2009 1:05 PM

  • HT5392 How can I use an Action List to re-order my layers in iAd Producer?  It looks like there's a tool for this, but I can't figure out how to use it.  I want to use a button to switch between a text field and a drawing pad layer.

    I am working on an iBooks Author Widget and want to allow the user to switch between drawing-pad functions and a text field on screen.  I'd like to create an action that will automatically re-order the layers so that the text field is accessible when typing but covered when writing by hand.  Then, I'd like the opposite to be available, so that the text field is accessible when typing, but the drawing pad is left alone.

    Have you tried using the selections in the Encore menu viewer that show you selected and activated states?

  • Text Field on top of a Button

    I'm using buttons to display an image dependent on a dropdown and need to include a text form on top of the images. When I put another drop down on top of the button it is still accessable but when I put a text field on top of the button the text field disapears and can't be selected to put type in. Is there a way to move it on top of the button?
    (function () {
    if (!event.willCommit) {
    var v = event.changeEx;
    this.getField("FlangePic").display = (v=="Flange") ? display.visible : display.hidden;
    this.getField("Dropdown4").display = (v=="Flange") ? display.visible : display.hidden;
    this.getField("PinionPic").display = (v=="Pinion") ? display.visible : display.hidden;
    //I would like to display "Number of Splines" text field on top of the picture of the spline
    this.getField("SplinePic").display = (v=="Spline") ? display.visible : display.hidden;
    Thanks

    TSN has a point, but since forms were introduced the tab order is also the z-order of fields. But if they are not read-only, they can recieve the focus, and a field that has the focus will appear to be on top. So if you set the button to read-only and set the tab order so the button is before the text field, it should work OK.
    Another option is to take advantage of the button label, which can have a number of placements. When the button is clicked it could prompt the user (e.g., app.response) to enter some text and then update the button label. You'd use the field.buttonSetCaption JavaScript method for this: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.738.html

  • Laying text fields on top of a graphic

    I thought the reason to use Fireworks was it's enhanced image
    compatibility with Dreamweaver.
    Is there a trick to laying a form object like a text field on
    top of a Fireworks image that was imported into dreamweaver as
    HTML?
    Thanks
    jerry H

    And either approach is troublesome, which is why you don't
    often see it done
    by experienced developers.
    Change the text size in the browser, and both methods can
    break your careful
    alignment.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "P@tty Ayers ~ACE"
    <[email protected]> wrote in message
    news:fluolr$d5m$[email protected]..
    >
    > "dream_kitchen" <[email protected]>
    wrote in message
    > news:flum2q$amb$[email protected]..
    >>I thought the reason to use Fireworks was it's
    enhanced image
    >>compatibility
    >> with Dreamweaver.
    >
    > It is. But once the image is brought into an HTML page
    (in Dreamweaver, or
    > any editor), it still has to fit within the way HTML
    works. You generally
    > can't just stack things on top of each other in HTML.
    >
    >> Is there a trick to laying a form object like a text
    field on top of a
    >> Fireworks image that was imported into dreamweaver
    as HTML?
    >
    > There are two ways I know of that you could do that. (1)
    Make the image
    > into a background image, or (2) put the text field in an
    absolutely
    > positioned div ("layer") on top of the image.
    >
    >
    > --
    > Patty Ayers | Adobe Community Expert
    > www.WebDevBiz.com
    > Free Articles on the Business of Web Development
    > Web Design Contract, Estimate Request Form, Estimate
    Worksheet
    > --
    >
    >

  • Bug? Text field & Button are still visible when solid-filled rectangle is placed on top of them

    Adobe Live Cycle 7.1
    It cannot work when i tried to make the text field and button invisible without JavaScript:
    1. Create a text field with any default value and button.
    2. Create a filled color rectangle.
    3. Set the rectangle on top of all objects (right click it and select "bring to front")
    4. View in Pdf.
    5. Result:
    Text field's caption and border are invisible (covered by rectangle) ,but the text field's raw value and the button are visible.
    Is this a bug?

    It's difficult to tell. I can see what you're trying to accomplish but it's possible that Acrobat is giving priority to fillable fields over static objects (such as the rectangle) regardless of z-order (i.e. "bring to front", "send to back"...).
    You can make objects invisible without having to write any script by selecting the objects which should be invisible and setting the Presence property, on the Object palette's Field tab, to
    Invisible or
    Hidden - Exclude from Layout. The former means the objects won't be visible but they will still be a factor in the way in which objects are placed on the form while the latter means they're totally hidden from the form.

  • How to insert a date picker input text field in a JSF Jsp page

    Hi,
    I have to develop an application using generic facets, unfortunately I am not supposed to use ADF Faces components given by Oracle.
    Now my requirement is, on JSP page an input text field which holds a DATE value is required, it should also have a Date Picker Calendar adjacent to it.
    Could you pls shed some light on this issue and help me out.
    Thanks
    ~Siva(ji)

    <HTML>
    <script language="JavaScript" type="text/javascript">
    <!--
    var pUpWidthc = 300; //Change the pUpWidthc to your requirements.
    var scrAvailc = 400;     //Change to your available screen width. You see in
    //this eBooks' middle frame, the frame width is
                                                                //equal to 410 . So whether your using frames or
                                                                //or a full 800 pixel screen, you must calculate
                                                                //your available screen width.
    var PopUpC = document.getElementById("pUpc");
    document.write('<div id="pUpc" style="visibility:hidden;z-index:4;width:'+pUpWidthc+';position:absolute;"></div>');
    function cstmPup(objC,c){
    popUpC = document.getElementById("pUpc");
    popUpC.innerHTML = c.innerHTML
    popUpC.style.left = getPos(objC,"Left");
    var scrNeedc = getPos(objC,"Left") + pUpWidthc;
    if (scrNeedc > scrAvailc){
    //The number 10 below is an extra offset x value applied when the
    //definitional popup box positions beyond your screen width. You
    //can change this number to fine tune your "beyond screenwidth" positioning.
    var scrOffsetC = getPos(objC,"Left") + pUpWidthc - (scrAvailc);
    popUpC.style.left = getPos(objC,"Left") - (scrOffsetC - 0);
    popUpC.style.top = getPos(objC,"Top") + objC.offsetHeight;
    popUpC.style.visibility = 'visible';
    fill();
    function fill()
         var noOfRows=7,noOfCols=7,i=0,j=0,day=1,x;
    var d1=FirstDayOfWeek(7,2008);
    //40     
         for(i=1;i<noOfRows;i++)
              x=document.getElementById('myTable').insertRow(i);
              for(j=0;j<noOfCols;j++)
                   var y=x.insertCell(j);
                   if( ( i==1 && j<d1))
                   y.innerHTML="";
                   else if(day<=DaysInMonth(7,2008)){
                   y.innerHTML=day;
                   day++;
    //document.write(FirstDayOfWeek(7,2008));
    function FirstDayOfWeek(m,y)
    var i;
    var dow = 6;
    //document.write("Hello");
    for (i=1583; i<y; i++)
    dow += (LeapYear(i)) ? 2 : 1;
    for (i=1; i<m; i++)
    dow += DaysInMonth(i,y);
    return dow % 7;
    function DaysInMonth(m,y)
    // m is the month number (1,2,3,...12), y is the year number (four digits)
    switch (m)
    case 1:
    case 3:
    case 5:
    case 7:
    case 8:
    case 10:
    case 12: return 31;
    case 2: if (LeapYear(y))
    return 29;
    else
    return 28;
    default: return 30;
    function LeapYear(y)
    return (y % 4==0) && ((y % 100!=0) || (y % 400==0));
    function getPos(objC,sPos){
    var iPos = 0;
    while (objC != null) {
    iPos += objC["offset" + sPos];
    objC = objC.offsetParent;}
    return iPos;
    function hPopUpc(){
    popUpC = document.getElementById("pUpc");
    popUpC.style.visibility = 'hidden';
    //-->
    </script>
    <BODY
    <button id="c1" onclick="cstmPup(c1,pUpCstm)">Custom PopUp</button>
    <'div' id="pUpCstm" style="display:none;">
    <'div' id="myid" align="left" style=" width:100%; height:100%; background:#cccccb; border:1px solid black; border-top:1px solid white; border-left:1px solid white; padding:10px; font:normal 10pt tahoma; padding-left:18px "> <b>Rich Message Boxes</b>
    <hr size="1" style="border:1px solid black;">
         <div style="width:220px; font-family:tahoma; font-size:80%; line-height:1.5em"><br>
              <table border ="1" id="myTable">
                   <TR>
                        <TD> SUN </TD>
                        <TD> MON </TD>
                        <TD> TUE </TD>
                        <TD> WED </TD>
                        <TD> THU </TD>
                        <TD> FRI </TD>
                        <TD> SAT </TD>
                   </TR>
              </table>
         <br><br>
         </div>
         <br>
         <div>
    <button tabindex="-1" onclick="hPopUpc()" style="border:1px solid black; border-left:1px solid white; border-top:1px solid white; background:#cccccc ">Close Message</button>
    </div>
    <?BODY
    </HTML>
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri

  • Is there a behavior that can swap a text field?

    I am creating a portfolio page for a client.  It currently has a 9 block of thumbs and another area where the thumb images appear enlarged when rolled over.  The client would also like to be able to add text beneath the large area telling about each project.  Is there a way to change the content in the text field on thumb rollover as well or is my only option to make the text part of the larger image?
    Thanks in advance for the help!

    Hi
    You could use a simple css rollover similar to -
    HTML -
    <div class="imagegallery">
    <a class="thumbnail" href="#thumb"><img src="../images/rosesthumb.jpg" width="100" height="68" border="0" /><span><img src="../images/roses.jpg" /><br />Simply beautiful.</span></a>
    CSS -
    .imagegallery{
    position: relative;
    /*Add a height attribute and set to largest image's height to prevent overlaying*/
    .thumbnail img{
    border: 1px solid white;
    margin: 0 5px 5px 0;
    .thumbnail:hover{
    background-color: transparent;
    .thumbnail:hover img{
    border: 1px solid blue;
    .thumbnail span{ /*CSS for enlarged image*/
    position: absolute;
    background-color: lightyellow;
    padding: 5px;
    left: -1000px;
    border: 1px dashed gray;
    visibility: hidden;
    color: black;
    text-decoration: none;
    .thumbnail span img{ /*CSS for enlarged image*/
    border-width: 0;
    padding: 2px;
    .thumbnail:hover span{ /*CSS for enlarged image*/
    visibility: visible;
    top: 0;
    left: 230px; /*position where enlarged image should offset horizontally */
    z-index: 50;
    Replace the items in red with your values.
    If this is not the effect you wish, can you explain a little more.
    PZ

  • Expanding text fields not co-operating

    I created a new form that spans over 2 pages and saved it as a dynamic PDF. I'm trying to allow for the text fields to expand as the user types beyond the intial size of the field. The field is set to "Expand to Fit". I have several sections of the form all separated by text headings. I have tried to wrap each section in a subform (set to "Flowed"), then wrap all the subforms to a larger subform (set to "Flowed").
    The problems that I'm encountering is each section that is wrapped in a subform looses the placement and whitespace between fields of all the fields and brings them in tight to each other. Then when i wrap all the subforms into one larger subform (set to "flowed"), my text headings and other text get rearranged and I can't change the order of reposition them with the white space.
    Below is a picture of my form in the nice tidy format that I'd like to keep. Then a picture of how it looks with each section in a subform and all of those subforms in a larger subform.
    Any help would be greatly appreciated!
    Before
    After

    Hi,
    Moving to Flowed layouts can be a pain. When you change to Flowed type, all of the objects are positioned from top left, based on the order in the hierarchy.
    You will need to adjust the objects margins in order to space them out.
    First I would adjust the content area on the Master Page, so that you have your margins in the right distance from the left (and top, bottom and right).
    See some examples here:
    Objects in flowed forms: http://assure.ly/e2jR0C
    Explore difference between flowed and positioned subforms: http://assure.ly/eSGQMt
    Some aspects for laying out objects: http://assure.ly/ewrLMo.
    Master pages and content areas: http://assure.ly/g0Wx7r.
    Another thing, when working with textfields (and other objects) you can set the caption to appear above the value area (go to the Layout palette). This means that you will only be dealing with one object instead of two (currently you have a text object and a textfield).
    If things are still out of order, then drag them into the correct order in the hierarchy and they will be in the right order on the page.
    Hope that helps,
    Niall

  • How can I get the "text" field from the actionEvent.getSource() ?

    I have some sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class JFrameTester{
         public static void main( String[] args ) {
              JFrame f = new JFrame("JFrame");
              f.setSize( 500, 500 );
              ArrayList < JButton > buttonsArr = new ArrayList < JButton > ();
              buttonsArr.add( new JButton( "first" ) );
              buttonsArr.add( new JButton( "second" ) );
              buttonsArr.add( new JButton( "third" ) );
              MyListener myListener = new MyListener();
              ( (JButton) buttonsArr.get( 0 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 1 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 2 ) ).addActionListener( myListener );
              JPanel panel = new JPanel();
              panel.add( buttonsArr.get( 0 ) );
              panel.add( buttonsArr.get( 1 ) );
              panel.add( buttonsArr.get( 2 ) );
              f.getContentPane().add( BorderLayout.CENTER, panel );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setVisible( true );
         public static class MyListener  implements ActionListener{
              public MyListener() {}
              public void actionPerformed( ActionEvent e ) {
                   System.out.println( "hi!! " + e.getSource() );
                   // I need to know a title of the button (which was clicked)...
    }The output of the code is something like this:
    hi! javax.swing.JButton[,140,5,60x25,alignmentX=0.0,alignmentY=0.5,
    border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@1ebcda2d,
    flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,
    disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,
    right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,
    rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=first,defaultCapable=true]
    I need this: "first" (from this part: "text=first" of the output above).
    Does anyone know how can I get the "text" field from the e.getSource() ?

    System.out.println( "hi!! " + ( (JButton) e.getSource() ).getText() );I think the problem is solved..If your need is to know the text of the button, yes.
    In a real-world application, no.
    In a RW application, a typical need is merely to know the "logical role" of the button (i.e., the button that validates the form, regardless of whether its text is "OK" or "Save", "Go",...). Text tends to vary much more than the structure of the UI over time.
    In this case you can get the source's name (+getName()+), which will be the name that you've set to the button at UI construction time. Or you can compare the source for equality with either button ( +if evt.getSource()==okButton) {...}+ ).
    All in all, I think the best solution is: don't use the same ActionListener for more than one action (+i.e.+ don't add the same ActionListener to all your buttons, which leads to a big if-then-else series in your actionPerformed() ).
    Eventually, if you're listening to a single button's actions, whose text change over time (e.g. "pause"/"resume" in a VCR bar), I still think it's a bad idea to rely on the text of the button - instead, this text corresponds to a logical state (resp. playing/paused), it is more maintainable to base your logic on the state - which is more resilient to the evolutions of the UI (e.g. if you happen to use 2 toggle buttons instead of one single play/pause button).

  • How do I set the value of a dynamic row text field

    I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.
    Top form looks like
    InputField
    | ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
    | ButtonXn | ButtonY1 | DescriptionXn
    OutputRow looks like
    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
    So I would like it to do
    ButtonX1.click
    OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on
    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
    Question 1
    How do I address the location in each table to set a value
    Question 2
    How do I get the value of the description field in the same table and row as the button
    I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
    OutputTable.OutputRow.OutputField2 = InputField.rawValue
      Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
    OutputTable.OutputRow.OutputField3 = this.ButtonLabel
    Question 3
      How can I get the value of the button's label to set in the field
      There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
    Question 4 - unrelated to those above.
    Is it possible to build the first table
    | ButtonX | ButtonY | Description |
    from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?

    Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
    So now to answer your questions:
    Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
    xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
    Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
    Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
    xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
    Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
    Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
    Hope that helps
    Paul

  • How do you add a scroll bar to a scrolling text field in a folio?

    I've created iPhone and iPad folios with multiple pages. There are scrolling text fields on each page. The fields scroll as designed, but the scroll bars on the  text fields only appear while actually scrolling. Is there a way to have them always visible so the user knows there is more hidden info? The only bars that are constantly visible are the page scroll bars.  Thanks!

    Why is your content pane null? I thought the content pane was the top-level in all windows? If you want complete control over the location of a list box, you want to set the layout of the content pane to null... the way I almost always do this is the other way around, to create my own panel and use setContentPane instead:
    JPanel content = new JPanel(null);
    JScrollPane scroll = new JScrollPane(myListBox);
    scroll.setBounds(380, 10, 500, 500);
    content.add(scroll);
    setContentPane(content);

  • Is there a way to link text fields in an interactive form in ID CS6?

    I'm recreating a form where they had several text fields on top of each other. If the form were not interactive, that would be so the user could use it to fill out longer, more detailed responses to the questions.
    But since it's supposed to be interactive, I question the need for this, unless I could link them somehow, so that a user's long answer would flow from one field to the next as needed.
    Is there a way to do that? Or would it work better to combine the 3 text fields into one big text field?
    If the latter, is there a way to change a text field back into a text or picture box? I can't seem to find that option.

    You cannot link PDF fields to each other.
    Make a text field Multiline and Scrollable to allow for extra input (in Acrobat, but not in InDesign, you can also set a limit on the number of characters).
    As I said elsewhere, choose Object > Interactive > Convert to Object to change a field to a regular object.

  • Safari 5.1.2 keeps changing text field randomly on text input

    Hello everybody.
    Safari keeps changing the text field on input, do you know how to correct this issue?
    Here is an example:
    Let's say I load www.google.com, it appears in the safari window as usual.
    Suppose I begin to type a search in the google search field at the top right of the safari window (not the one on the google page)
    if when doing this the sentence is long for the search, at some point randomly, the rest of the text will be entered this time in the google search text field on the google page! (which is the very next text field) So when I hit enter it makes google search half of my request...
    Safari changed the text field I was into with no warning. I want to say I do not press tab at any moment.
    This is annoying really, and this does not appear anywhere else than in Safari. It seems the issue is not systematic, but appears quite often.
    I have no universal access setting except "enable access for assistive device"
    I had to check this box upon installing a software in the past but I can't remember what it was.
    Perhaps the problem I have is linked to some window refreshing?
    Thank you for your suggestions or help
    Mac Pro, 10.6.8

    Try deleting the cache associated with Safari ...
    Quit Safari.
    Go to ~/Library/Caches/com.apple.Safari/Cache.db.
    Move the Cache.db file to the Trash.
    Relaunch Safari to test.
    I had to check this box upon installing a software in the past but I can't remember what it was.
    Open System Preferences > Universal Access
    Make sure the box next to:  Enable access for aassitive devices is deselected.

Maybe you are looking for