How to compare text field length with the length of input characers

I hae a problem with the length of text field
I want to fix the length of TextField by taking the length of attribute to, whihc i have to use in text field
Like i have set the max length of Attribut to 10 and set the length of textfield also 10.
But the problem is that if i enter 10 'i' it dosn't fill even half the space in TextField
And opposit if i enter 10 'W'
I wonder if there is a solution for this problem
i ma using True Type of Font

* paint method in your own class that extends Canvas
* @param g where to paint e.g. printer, screen, ram
public void paint (Graphics g)
// display word "today" centred at x,y
FontMetrics fm = getFontMetrics( g.getFont( ) );
String wording = "today" ;
int xadj = fm.stringWidth( wording )/ 2;
// position bottom left corner of the text
g.drawString(wording , x-xadj, y );
// draw a red line from x1,y1 to x2,y2
g.setColor( Color .red );
g.drawLine( x1 , y1, x2, y2);
// draw an pre-existing Image. imX,imY is top left corner of the Image.
g.drawImage ( image , imX, imY , imWidth, imHeight , this);
} //end paint

Similar Messages

  • How to compare text box value with the table data??

    Hello ALL,
    I created one stored procedure in DB,it is as follows:-
    CREATE or replace PROCEDURE chkUser
    u in varchar2,
    p in varchar2,
    ap out varchar2
    is
    begin
    select count(*) into ap from tbuser where loginid = u and password = p;
    end;
    And at the front end I have designed a form with 2 text boxes, now my question is I wanna compare these text box values(which user enters) with the data of the table....??? something like control (may be I am not sure)..... ???
    If anybody can help me out with this issue...... help will be appreciated
    Thank you.
    regards,
    Kumar

    hi Elise,
    I'm always getting the Error Message as "Invalid Creditianls"... let me tell you the whole scenario with sql synatx.
    I have created tables as:-
    CREATE TABLE "TBUSER"
    (     "LOGINID" VARCHAR2(30) NOT NULL ENABLE,
         "PASSWORD" VARCHAR2(30),
         CONSTRAINT "TBUSER_PK" PRIMARY KEY ("LOGINID") ENABLE
    than I created the Procedure on tbuser, it is as:-
    create or replace PROCEDURE logincheck
    u in varchar2,
    p in varchar2,
    ap out varchar2
    is
    begin
    select count(*) into ap from tbuser where loginid = u and password = p;
    end;
    now at the front end side I have created one form with 2 text boxes (P8_USERNAME & P8_PASSWORD) and 2 buttons (Cancel and Submit)
    as per you told me in the above post, I have created 'Validation' procedure with Type as 'Exists' and expression(into Validation Expression1)as:-
    select 1 from tbuser
    where loginid = :P8_USERNAME
    and password = :P8_PASSWORD;
    and
    kept an error message as 'Invalid credentials'.....
    but I don't know what's going wrong..... I do have few data into the table, and when I am entering the same data(with case sensitive) I am getting the Error message, rather than when the credentials are perfect user should be allowed to enter into the current page(where I have created this form and validation procedure)....
    any idea what's going worng and where...????
    thxs.... appreciated..
    regards,
    Kumar

  • How to make text clicks go with the volume?

    My old iPod 3G used to make text typing sounds according to my volume. So if my volume was off there would be no text noises but with my new iPod touch the texting sounds are there regardless.  What do I do?

    Roxpat wrote:
    I'm beginning to consider learning other applications (Dreamweaver and/or specific languages), so feel free to offer those up as well.
    roxpat ~ Since your web site content is community oriented, you may be interested in this free, web-based site builder for social networks:
    http://about.ning.com/product.php
    ...Their Events feature lets members know about upcoming playgroups, coffee mornings, etc. related to your social network's theme. Read more here.
    You may want to consider hyperlinking from your iWeb site to a Ning site to provide some specific feature that iWeb doesn't offer.

  • How do you text an email with the palm pre?

    can someone tell me how i would go about texting someone an email that i received. . . i don't want to email it I want to text the email. . . I tried to save it as a memo and then send it as a text but it wouldn't do it and I tried to copy the email and paste it to text but it wouldn't let me do that either. . . any suggestions?

    Shift-tap the email, and it should highlight so you can gesture tap-C to copy it and gesture-V to paste to text.
    How long is this email? It could be very cumbersome for the receiver.

  • How to get a minus sign with the cost  field in ALV.

    Hi ,
    How to get a minus sign with the cost field in ALV.
    The Ouput will be displayed like  Rs -1500 instead of 1500-
    I can't use concatenate also as i may have to use the sum functionality of ALV .
    Cheers
    Sunny

    Hi sunny,
    1. The OTHER FIELD
       has to be character field of say length 15.
    2. Write the original numeric value to
       this character field (in a loop)
    3. But simply writing won't help.
    4. use this kind of logic.
    5.
    REPORT abc.
    DATA : m TYPE i.
    DATA : chr(15) TYPE c.
    m = -100.
    WRITE m TO chr.
    IF m < 0.
      SHIFT chr RIGHT BY 1 PLACES.
      CONDENSE chr.
      CONCATENATE '-' chr INTO chr.
    ENDIF.
    WRITE chr.
    regards,
    amit m.

  • How can I create a box with the option of either a check or "N/A"?

    Hi there guys, just a quick question which has been bugging me for days now!
    I have a form in which I need to have a check box, but when the box is not checked I need it to show up as "N/A", is that possible?
    I have tried using a dropdown box instead. Making one of the options a capital "P" and setting the font to Wingdings 2 makes it appear as a check. This however makes it impossible for me to type in "N/A" as the other option because the font is set to Wingdings 2!
    Any help would be greatly appreciated
    I am using Adobe Acrobat X Pro on Windows 7
    Thank you
    Clint

    Have you ever seen a paper form work this way?
    Have you ever seen an electronic form work this way?
    You can have a text field next to the check box that show "N/A" when the check box is not selected.
    Or if you like to do a lot of coding, use a check box and then overlay the check box with a text box to display the "N/A" and you can work out how switch between the 2 fields if one wants to uncheck the item.

  • How to export string in CDATA with the jaxb xml writer?

    How to export string in CDATA with the jaxb xml writer?
    It read CDATA no problem but it is lost on write.

    Found it:
    ### THIS WORKS WITH SUN JAXB REFERENCE IMPLEMENTATION. ###
    (Not tested with any other)
    In the xsd, you must create a type for your string-like element.
    Then associate a data type converter class to this new type, which will produce CDATA tags.
    Then you must set a custom characterEscapeHandler to avoid the default xml escaping in order to preserve the previously produced CDATA tag.
    Good luck.
    -----type converter-----
    import javax.xml.bind.DatatypeConverter;
    public class ExpressionConverter {
         * Convert an expression from an XML file into an internal representation. JAXB will
         * probably have already stripped off the CDATA encapsulation. As a result, this method
         * simply invokes the JAXB type conversion for strings but does not take any other action.
         * @param text an XML-compliant expression
         * @return a pure string expression
         public static String parse(String text) {
              String result = DatatypeConverter.parseString(text);
              return result;
         * Convert an expression from its internal representation to an XML-compliant version.
         * This method will simply surround the string in a CDATA block and return the result.
         * @param text a pure string expression
         * @return the expression encapsulated within a CDATA block
         public static String print(String text) {
              StringBuffer sb = new StringBuffer(text.length() + 20); //should add the length of the CDATA tags + 8 EOLs to be safe
              sb.append("<![CDATA[");
              sb.append(wrapLines(text, 80));
              sb.append("]]>");
              return DatatypeConverter.printString(sb.toString());
         * Provides line-wrapping for long text strings. EOL indicators are inserted at
         * word boundaries once a specified line-length has been exceeded.
         * @param text the string to be wrapped
         * @param lineLength the maximum number of characters that should be included in a single line
         * @return the new string with appropriate EOL insertions
         private static String wrapLines(String text, int lineLength) {
              //wrap logic, watchout for quoted strings!!!!
              return text;
    ------in caller----
    Marshaller writer = ......
    writer.setProperty("com.sun.xml.bind.characterEscapeHandler", new NoCharacterEscapeHandler());
    -----escaper-----
    import java.io.IOException;
    import java.io.Writer;
    import com.sun.xml.bind.marshaller.CharacterEscapeHandler;
    public class NoCharacterEscapeHandler implements CharacterEscapeHandler {
         * Escape characters inside the buffer and send the output to the writer.
         * @param buf buffer of characters to be encoded
         * @param start the index position of the first character that should be encoded
         * @param len the number of characters that should be encoded
         * @param isAttValue true, if the buffer represents an XML tag attribute
         * @param out the output stream
         * @throws IOException if the writing process fails
         public void escape(char[] buf, int start, int len, boolean isAttValue, Writer out) throws IOException {
              for (int i = start; i < start + len; i++) {
                   char ch = buf;
                   if (isAttValue) {
                        // isAttValue is set to true when the marshaller is processing
                        // attribute values. Inside attribute values, there are more
                        // things you need to escape, usually.
                        if (ch == '&') {
                             out.write("&");
                        } else if (ch == '>') {
                             out.write(">");
                        } else if (ch == '<') {
                             out.write("<");
                        } else if (ch == '"') {
                             out.write(""");
                        } else if (ch == '\'') {
                             out.write("&apos;");
                        } else if (ch > 0x7F) {
                             // escape everything above ASCII to &#xXXXX;
                             out.write("&#x");
                             out.write(Integer.toHexString(ch));
                             out.write(";");
                        } else {
                             out.write(ch);
                   } else {
                        out.write(ch);
              return;

  • Text field properties-Using the 'required' option in the text field properties.

    Using the required' option in the text field properties.
    The 'help' manual describes the 'required' function as this: Required Forces the user to fill in the selected form field. If the user attempts to submit the form while a required field is blank, an error message appears and the empty required form field is highlighted.
    My users ARE not submitting the form, they open the pdf, fill it out and print it. HOW can I, make a field "required', I don't want them to skip/leave blank specific fields. However, if I choose the box 'required' in the text field properties, and I begin filling out the form, I can just tab past that field that I've choose as 'required', and I do not get
    prompt/error message or anything, it allows me to save, or print.
    I WANT SOME TYPE OF message (similar to enter a company order form
    off the web, where you can't continue without filling out 'required' fields).
    Is there a step/option I am not doing?

    Then you are going to have to write some JavaScirpt to be executed by the "Will Print" document action to check all the requried fields, either by name or by the 'required' property and handle the issue of the imcomplete fields. You will not be able to stop the print, but you could display and error field so the user knows the form is incomplete and the printed form also conatains this information.

  • I imported a video I make in another program and I played it back in the video editor and I like the pan and zoom that was added by the program how do I save a copy with the effect of Premiere elements 12

    I imported a video I make in movie maker program and I played it back in the premiere video editor and I like the pan and zoom that was added by the program how do I save a copy with the effect of Premiere elements 12
    all I did was played it back how do I save that and make a new version of the video beacause when I save a copy the effect look I was trying to save was not there.
    Rodney
    [personal information removed... Mod - https://forums.adobe.com/docs/DOC-3731]
    [This is an open forum, not Adobe support, please do not post personal information]
    [If you are posting using email, please turn your 'sig file' function OFF for posting]

    silkman1
    I would be glad for the opportunity to customize a Premiere Elements 12 answer to your Premiere Elements 12 issue.
    But, I want to make sure that we are together on the details. This is my understanding of what you have written. Please review and let me
    know if I am misinterpreting anything that you have written.
    You have a video created in Windows Movie Maker.
    How did you output the video from Windows Movie Maker...wmv or mp4, what was the frame size and frame rate of that export?
    Next you import that video into Premiere Elements 12 (can we assume that this is on Windows 7, 8, or 8.1 64 bit?)
    From what you wrote, you have applied a pan and zoom effect to your video in Premiere Elements.
    Now you go to export the Premiere Elements 12 Timeline content with your video with the pan and zoom applied.
    But, the pan and zoom effect is not seen in playback of the export.
    Is all of the above correct so far?
    If so....we are going to need some more details from you...
    a. What is the project preset that you or the project are setting to match the properties of the video coming from Movie maker? See Edit Menu/Project Settings/General and the readings for Editing Mode, Timebase, Frame Rate, and Pixel Aspect Ratio even if the fields look grayed out.
    b. Are you applying the pan and zoom effect with the Pan and Zoom Tool, fx Effects Presets, or keyframing the Scale (for Zoom) and
    Position (for Pan) in the Motion Panel expanded?
    c. What are you selecting as your export in Publish+Share/. Please give details...are you using default settings or customizing the export
    setting under the Advanced Button/Video Tab and Audio Tab of the preset selected?
    I am suspecting some sort of mismatch of your project settings or some problems with working with the Pan and Zoom tool. I need
    your answers to help me help you. If I have written anything that you do not understand, please let me know. I will re-write if necessary
    so that we are in sync to resolve the issue.
    Thanks.
    ATR

  • Debugging field-exit with the new debugger

    Hi everyone,
    I could debug a field-exit with the new debugger, but I cannot do it anymore. I  chose the options "system debug" and "update debug" in the configuration menu that time but it's not working now.
    Before you answer "<b>FIELD-EXIT CANNOT BE DEBUG!</b>", take a look first at the The New ABAP Debugger 7.00 Presentation where it mentions that's possible.
    And also I saw a post: Re: activation of field exit for particular sereen
    where Ramesh Kashigari said that it's possible too.
    Anyone knows How can I configurate the new debbuger for this?

    Hi Florian,
    I agree that it should now be possible. I saw this on a SAP Java Development Day at the start of '04 when NetWeaver 04 was launched.
    I saw it being used in the NetWeaver Development Studio.
    It seemed very clever indeed. You could debug the Java code then jump to the ABAP debugger when the BAPI is called then jump back into the Java code when the BAPI call is completed. It seemed to work very well and did not have any issues.
    Hope this helps.
    Kind regards
    Colin.:)

  • How to pass username and password with the portal url

    i want to access portal from my web site. i have created username and password fields in my web page. when submited , my portal page should open. so how to pass username and password with the portal url.

    This is not straightforward; but it is doable.
    First tell us about your portal version; portal 10.1.4 has a slightly different method of doing it and the pre-10g portals were completely different animals.
    And if you are in AS Rel 2, then the most important document for you would probably be the following:
    [Creating Deployment Specific Pages| http://download-west.oracle.com/docs/cd/B14099_19/idmanage.1012/b14078/custom.htm#i1015535]
    You might want to use it in conjunction with some metalink notes about your portal version and such a login page.
    hope that helps!
    AMN

  • Can the fields grow with the section expanding?

    Post Author: KennyG
    CA Forum: General
    Can the fields grow with the section expanding?There are several fields in one section of my report, all the fields are formatted with "Can Grow" checked and bottom border showed. In design mode, all the bottom borders stick to the bottom of the section. However, when print, the section may expand as some fields grow, but the rest fields can not expand automaticly with the section, so the bottom borders will not be at the same height as before. How can I deal with it? Is there any option about this?
    Any suggestion would be greatly appreciated

    Post Author: MikeA-ICE
    CA Forum: General
    One thought I have is to insert another section just below the one where the growing fields are and put a single line or individual lines under those fields. Move it up to the top of that new section and move the break between the existing section and the newly added one tight up against the bottom of the 'can grow' fields.
    Another possiblity lies in the fact that the "Can Grow" option has a formula attached to it. I don't know if it will work or not but maybe an If/Then formula could tell field B to grow if field A grows. I've never tried that but it may be possible. I'd think the first suggestion would be the one to try first.
    Mike

  • Compare an old report with the new one

    Hi,
    i have saved a report in Answers. Then in my cube data are changed. In Answers i re-submit request and save new report with new data. Now I would compare two reports. But when i open old report, data shown are new. So I have two identical reports. How can I compare an old report with the new one? Thanks
    Giancarlo

    ok then why don't you create two distinct reports but each with different filter value on the time column.
    so that one report will give you old results. another report will give you new results.

  • How to compare dropdown pre value with post value in sharepoint designer list workflow

    How to compare dropdown pre value with post value in sharepoint designer list workflow

    Hi,
    Can you provide more details about your requirement? It would make others easier to find a solution for you.
    By default, a workflow will be triggered after submitting data in the NewForm or EditForm.
    If you want to monitor the value changed in a drop down menu which is supposed to be in NewForm or EditForm, it would be more appropriate to apply custom JavaScript in the NewForm
    or EditForm page.
    About how to detect the value changed using JavaScript, the demos in this thread would be helpful:
    http://stackoverflow.com/questions/12080098/dropdown-using-javascript-onchange
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to append S950 Info structure with the structure ZS950

    I have created Info structure ,now How to append S950 Info structure with the structure ZS950

    Refer this link:
    Addition of a new field to a standard table .
    Regards,
    ravi

Maybe you are looking for

  • How to set a field from an assigment block as required for a BP creation

    Hi, I have the following requirement. On employee master data creation, I want to make field System user mandatory in Employee creation. Iam using Component: BP_EMPL View: BP_EMPL/EmployeeDetails It happens that this field is inside an assignment blo

  • Third party Firewire cards suggestions

    I am not sure how Firewire works, but I am having some issues with Logic Pro and the only thing left to try is to reduce my Firewire traffic. Does anyone have a recommendation for a Firewire 800 and or a Firewire 400 add in card that my have individu

  • How to clean the duplicated photographs in Iphoto

    i pressed Duplicate command thinking it will clean all duplicates but now my photographs are in thousands; How do i delete the duplicate photographs in Iphoto.

  • Negative Values in G/L debit side

    Hi,    G/L account is showing negative figure at G/L Debit side. Can anybody tell me what would be the reason? and How can we configure ? Thanks and Regards, Mustafeez

  • Photosmart 375 paper size error msg

    My Mac has OS X 10.10.1. When I attenpt to print on my portable photosmart 375, I receive the error message "Paper is too small. Choose a larger paper size." I believe I should be choosing 4x6 size in the print dialog box on my computer, and the same