How to calculate the size of a Text Field?

Is there a way to calculate the number of characters allow in a Text Field? If a uer type over this number of characters a popup window will appear telling the user that he/she has too much texts. Of course I could use the Limit Length, but I have to manually put texts into this text field and count them. If the Limit Lenth number is too small, the texts does not fill the whole text field. If the number is too big then the texts does not get printed.

There would be no easy way to do this. You'd need to do some pretty fancy calculations, it would all depend on the size of the field, what font is used, the font size, whether it's been bolded, underlined, italicized, etc etc.
What are you trying to accomplish? Make it so that the user can type in the text field until it fills and then have it stop without scroll bars coming up to allow him to keep typing?
Chris
Adobe Enterprise Developer Support

Similar Messages

  • How to calculate the size of web forms in hyperion planning?

    Hi Experts,
    I am trying to calculate the size of planning forms in Hyperion smart view., but i am unable to find out the way to calculate.
    Can you pls explain how to calculate the size of web form in Smart view?
    --- Srini.

    Hi Srini,
    First, here is what Oracle says:
    Data Form Size Estimation:
    To get a rough estimate of data form size, open the data form and select File > Save As from the browser. The size of the .HTML file is the portion of the data form that changes based on grid size. The .JS files remain the same size and can be cached, depending on browser settings. Information such as data form definitions, pages, and .gif files are not compressed when data forms are opened and sent to the Web browser.
    I have not been able to find out using their method.
    In any case, you can find out the size of grid by using below
    1. Right click on the form grid and click "View source"
    2. Save the source file as "Example.html"
    3. Right click the saved file and click "Properties"
    4. The Form size whould be same as that of file..
    Let me know if it helps.
    Cheers
    RS

  • How to calculate the size each PSA request or all PSA for the Datasources?

    Hi All,
    Can anybody tell me how to calculate the size of each PSA Request or all PSA's requests for all datasources?
    Regards,
    Rajesh

    Hi ,
    PSA technical name can be found as,
    1)Right click on your Data Target,go to Display dataflow,click on the PSA ,here you can find the technical name.
    2)Goto RSRV tcode>PSA Table>Consistency between PSA Partitions and SAP Administration-->Give your Infosoure name,it gives u PSA technical name also,
    Thanks&Regards,
    Praveena.

  • Dynamically change the size of a text field.

    Is it possible to change the size of a text field depending on the amount of text in the field?
    Thanks,
    Chad

    You can find the answer from this post.
    jimmypham, ""Shrink to Fit" - Text Field capability?" #1, 18 Jul 2005 10:36 pm

  • How to determine the size of selected text

    Hi
    I'd like to draw a box around some selected text (a textRange), however I can't figure out how to detemine the size or position of the text.  The overall size of a textFrame is possible to find (not sure about position), but when you've got just a few characters selected I don't see any way to get the size or position.  Any ideas?

    You may have to do some testing of your own with this… I tested here and 'think' its OK but could have overlooked something… For me the best way to get this data is to outline the type store the info in a variable then undo the outlining process… You can then continue your script with info in hand… An example that draws a box over each selected character… I cheated with only the one text frame but you can resolve that? You could easy use math.min & math.max to draw around an array of bounds… I didn't bother with a load of tests it expects selected text range as is… have fun…
    #target Illustrator
    textBoxer();
    function textBoxer() {
              var i, doc, sel, start, end, spaceB4, spaceInc, mat, grp, count, boxes;
              doc = app.activeDocument;
              sel = doc.selection;
              start = sel.characterOffset-1; // Not zero based…
              end = start + sel.length;
              doc.selection = null;
              spaceB4 = doc.textFrames[0].contents.substr( 0, start );  // Cheated here you will need to find parent frame…
              mat = spaceB4.match( /\s/g ); // Resolve the lost of white space characters before selection
              mat != null ? spaceB4 = mat.length : spaceB4 = 0;
              spaceInc = doc.textFrames[0].contents.substr( 0, end );  // Here too…
              mat = spaceInc.match( /\s/g ); // Resolve the lost of white space characters in selection
              mat != null ? spaceInc = mat.length : spaceInc = 0;
              grp = doc.textFrames[0].createOutline(); // Items in new group are last to first order
              app.redraw();
              count = grp.compoundPathItems.length;
              boxes = Array();
              for ( i = 0; i < count; i++ ) {
                        boxes.push( grp.compoundPathItems[i].visibleBounds );
              boxes.reverse(); // Fix the order
              app.undo(); // Bounce back…
              app.redraw();
              start = start - spaceB4;
              end = end - spaceInc;
              for ( i = start; i < end; i++ ) {
                                  doc.pathItems.rectangle( boxes[i][1], boxes[i][0], boxes[i][2]-boxes[i][0], -boxes[i][3]- -boxes[i][1], false );
              app.redraw();

  • How to calculate the size of DB given the transaction and the INVT

    Hi,
    I need to know the size of a database
    transactions/day-900
    Total Items=12,200
    We are preparing for a proposal .The above is the descriptions given by the client.
    How to estimate the size of database We need to design a hardware configuration
    Can anyone help me
    Maran.

    Any clue regarding the size of the row in the 900 transactions per day?
    Will there be a single table updated per transaction or multiple tables?
    Will the transaction be of type insert mostly?
    If it is going to be insert only, then probably you can estimate the database size based on size of row * 900 transactions per day... You need to consider if there will be other tables affected via triggers.
    Also, the size of the indexes defined on these tables will contribute to the database size.
    No idea as to what do you mean by 12,200 items.
    Message was edited by:
    satishkandi

  • How to calculate the size of the heap memory? its urgent pls

    i had a task in which i need to calculate the size of the heap memory can anybody help me its urgent pls

    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    Specifically:
    max/total/freeMemory()
    http://javaalmanac.com/egs/java.lang/GetHeapSize.html?l=new

  • How to set fixed size for inputfile text field

    Hi all,
    I am using inputfile component to test file uploading so I created a simple upload page. When I finished upload the file, the input text field will "shrink" its size and change the size to adjust the file name. Is there any way to set a fix size for input text field?
    Here is some part of the code:
    <af:form id="f1" usesUpload="true">
    <af:panelHeader text="File Uploader" id="ph1">
    <af:inputFile label="File to upload" id="if1" autoSubmit="true" valueChangeListener="#{fileBean.fileUpdate}"
    value="#{fileBean.file}" partialTriggers="if1"
    columns="50"/>
    </af:panelHeader>
    <af:commandButton text="Save" id="cb1"/>
    FileBean:
    public void fileUpdate(ValueChangeEvent valueChangeEvent) {
    RichInputFile inputFileComponent = (RichInputFile)valueChangeEvent.getComponent();
    UploadedFile newFile = (UploadedFile)valueChangeEvent.getNewValue();
    UploadedFile oldFile = (UploadedFile)valueChangeEvent.getOldValue();
    Thanks,
    Jerry

    you can set columns attribute in af:inputfile. Please see highlighted area i have inserted to you code
    <af:form id="f1" usesUpload="true">
    <af:panelHeader text="File Uploader" id="ph1" columns = "34" >
    <af:inputFile label="File to upload" id="if1" autoSubmit="true" valueChangeListener="#{fileBean.fileUpdate}"
    value="#{fileBean.file}" partialTriggers="if1"
    columns="50"/>
    </af:panelHeader>
    <af:commandButton text="Save" id="cb1"/>

  • How to calculate the size of JTextPane in advance?

    I have a dialog that contains JTextPane. The text that is to be displayed in the JTextPane is obtained at run-time and is passed to the dialog constructor.
    Providing that I know how width the JTextPane should be, how can I calculate the height that will be sufficient to hold the text? I want to make all the text visible; I do not want to use JScrollPane.
    gracjan

    Hi!
            int width=somewidth;
            pane.setSize(width,Integer.MAX_VALUE);
            int height=pane.getPreferredSize().height;works fine for me when pane is JEditorPane.
    You may look at reply 5 and 6 of this:
    http://forum.java.sun.com/thread.jspa?threadID=5114687
    Annette

  • How to calculate the size of database (a different one)

    Hello Friends,
    I am told to move the data from server to another machine (cloning is one very good option, I agree. But I expect a different answer regarding exports and imports). so How should I go about the task. The destination machine has got unlimited space. So thats not a problem. My questions are :
    1) How should I start the task ( I generally go for studying the structures and their sizes. Is it ok ?)
    2) If I am using Unix machine and there is a limitation that my server will not support file sizes of more than 2 GB, What should I do ?
    3) Shall I have to go for a full database backup or fragment the task ? If I do that , there are many schemas, so it will become tedious. But full backup will exceed OS size limitation. What should be done ?
    4) Is there anyway, I can go through a dump file, to find out, the database objects present inside that and note the related dependencies.
    Please respond.
    Regards,
    Ravi Duvvuri

    1) They are Unix machines. So will the size problem occur(if there is a limitation). How to overcome that?
    If the OS are of the same version you will have any problem. Regarding the storage only you have to have space in disk to store the datafiles, redo logs and controlfiles and nothing else.
    2) I am trying Export/import measure. Though there are other good methods, I just want to explore the full capabilities of Exp/Imp
    r.- Recreate the controlfiles is more effective and fast if the OS are of the same version.
    3) And the oracle version is 9i 2. (If I have to perform this on 8i (both source and destination, will the methods are going to differ ?)).
    R.- The method is the same for 8i/9i/10g.
    How should I go about doing this export/import ?
    r.- To use this method you have to have the original database started.
    To recreate the controlfile without having the datafile that you mentioned you have to get out it from the CREATE CONTROLFILE sentence and that's it.
    For Example: I mean, if your database has 8 datafiles and you have only 7, you have to include only 7 in the CREATE CONTROLFILE sentence.
    Joel Pérez
    http://otn.oracle.com/experts

  • How to calculate the size and number of nodes in the btree?

    I need to determine the size of the btree nodes in the log file and the how many internal and leaf nodes in the btree. For example if I have 2.88M records approximately how much disk space is used up by the JE's internal structures? This info will help me determine the best size of the data records.

    Chad,
    Keys are stored in order in the btree. They are ordered by the custom comparator if one is used, otherwise by the default (unsigned byte) comparator.
    Key prefixing (when it is available -- remember that we're talking about a future feature here) reduces memory and disk space for the adjacent keys in a Btree node when the initial bytes of those keys are in common.
    If your keys that are adjacent (according to your custom comparator) don't have common bytes at the front, then key prefixing won't have any advantage.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to move the cursor to a text field

    Hello,
    I have a log in window with Username (Text field) and password (Secure Text field). The 'Log In' button is not enabled if I use the Set command. So I wish to use the Keystroke.
    But I need to make sure that Cursor is in the text field and then to keystroke. So how can I move the cursor to the required text filed?
    Note:
    +Why the cursor is not blinking in the text field where I just 'SET' (command)+
    +the value?+

    Well, for a start you can identify the application you're working in. That's kind of important.
    In most cases you can just emulate a press of the tab key but it's kind of a crude a approach (there's no guarantee that you're in the field you expect). Certain applications, though, may have better ways of achieving it, but since we don't know what application you're using we can't say if that's the case here.

  • How to change the font in a text field?

    I am trying to recreate a file like this:
    http://www.teacherspayteachers.com/Product/Thank-You-Cards-for-Volunteers-Freebie-Editable Customizable-696763
    I originally created the file in Powerpoint, saved as a PDF, brought it into Adobe Pro XI for Mac.  I edit it in forms, and add a text form field, which inserts a blue box, with text1 in the middle.  How do I replace that with different font and size, in the above example, she has a different font in a larger size.  When I look at the properties, I am limited up to 8 point font.  I have been at this for hours now, so any help would be greatly appreciated, especially step by step.  Thanks.

    Click on each field and the choose Properties from either File menu (or if on Mac hold dow mouse button until context menu appears choose properties)
    go to Font
    choose desired size and type font,you can choose to make this the default.
    Do this with each field.
    Or if you have a lot of fields:
    while one is selected select all of them
    then go to fonts in properties
    change Font and size and make default.

  • How to get the handle of all text fields in the subforms, using script

    Hi Friends,
    I have around 20 fields in a subform, how can i get the names of all the fields using script.
    I wish to enhance the following script where the field names are hard coded
    thereby the script itself will get the names of the field names.
    var f1 = this.parent.somExpression + ".TextField2" + ",";
    var f2 = f1 + this.parent.somExpression + ".DropDownList1" + ",";
    var f3 = f2 + this.parent.somExpression + ".NumericField1";
    xfa.host.resetData(f3);
    Any help will be greatly appreciated..
    Thanks
    JJ

    Hi Paul,
    Thanks for your comments.
    I achieved the clear contents by resetting, by taking input from your thoughts..
    form1.sub1.sub2.sub3.table_1.addDelete_Top.addDelete.deleteRow::click - (JavaScript, client)
    //Here is my code finally look like..
    //row 1, table_1 are also subforms
    for (var i=1;i<10;i++){
    var myRow = this.resolveNode("table_1.row1[" + i + "]");
    if(myRow.presence == "hidden"){
    i = i-1;
    var myRowDelete = this.resolveNode("table_1.row1[" + i + "]");
    if(i!=0){
    xfa.host.resetData(myRowDelete.somExpression);
    myRowDelete.presence = "hidden";
    break;
    if(i==9){
    xfa.host.resetData(myRow.somExpression);
    myRow.presence = "hidden";
    break;
    Thanks
    JJ

  • How to calculate the days with a date field

    I need to make a query that shows the number of flown days at the end of the month for the whole fleet, given a date that represents one day within that month.
    I would appreciate all the help I can get
    thanks in advance

    Hi,
    I am not sure if I interpreted your question correctly, but are you looking for counting for number of days between two days?
    If yes, see if the following example query helps you.
    SQL>select to_date('30-Jun-2003') - to_date('30-May-2003') from dual
    - this returns 31.
    If not, could you please give more details of your requirement with an example?
    -Savitha.

Maybe you are looking for

  • Unable to place order in R12.1.3 - Validation Fail

    Hi All, Can anybody tell me why I get following error message when I try to place order from istore. Error messages from Order Management Error in Line: 1.0 :Validation failed for the field - Ship To Error in Line: 1.0 :Validation failed for the fiel

  • Computer shut down during "Toshiba configuring system"

    I did see a similar thread, but I didn't want to hijack it and my questions are a little different. So first of all, I reformatted the computer to "out of box" factory settings because I had a virus, the virus can't get into this hidden partition rig

  • Hi Gurus :  about BAPI

    Hi GURUS,         I want to extract customer general data,customer sales data,customer company code data, customer partner rolls data...so could any body suggest me BAPI available for this.....available one bapi ? Pls suggest it would be great helpfu

  • Applescript list with multiple selections

    Hello guys, i have h big problem... i was trying the multiple selections part by the command list, but if i select 2- and more it does nothing (i'm using if x is y then *linebreake* else if ...) so i tried another way script: tell application "Finder

  • Solution of "no ocijdbc8 in shared library path" Windows95 Jdeveloper 3.0

    I installed Jdeveloper 3.0 and got the message "no ocijdbc8 in shared library path". We are using Oracle 8.0.5 so I had Oracle 8.0.5 client in my PC. 1. I down loaded oci805jdbc.dll, oci805jdbc_g.dll and put my c:\orawin95\bin directory. The PATH con