Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 632097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:02:20+00:00 2026-05-13T20:02:20+00:00

I am using an image for text field. When I focus on it to

  • 0

I am using an image for text field.

When I focus on it to write something the first letter of the text that I write gets half cut.

How to avoid that?

My code is:

textbox = new EditField(EditField.NO_NEWLINE) 
    {
     protected void layout(int width, int height) 
     {
         super.layout(1000, 38);
         super.setExtent((Display.getWidth()),30); 
     }
    }

 manager = new VerticalFieldManager(HORIZONTAL_SCROLL)
    {
     protected void paint(Graphics g) 
    {
      int x = this.getHorizontalScroll();
         g.drawBitmap( x, 0,textbox.getWidth(),textboxc.getHeight(),textbox, 0, 0 );
         super.paint(g);
    }
         protected void sublayout(int maxWidth, int maxHeight) 
         {
             Field field = testbox;
             layoutChild(field, Display.getWidth(), Display.getHeight());
             setPositionChild(field, 148, 8);
             super.sublayout(maxWidth, maxHeight);
        }
   }

manager.add(textbox);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:02:20+00:00Added an answer on May 13, 2026 at 8:02 pm
    textbox= new EditField(" ","",500,EditField.NO_NEWLINE | Field.FOCUSABLE) 
             {
                 protected void paint(Graphics g)
                    {
                        g.setColor(Color.MAROON);
                        super.paint(g);
                    }
                protected boolean keyChar(char key, int status, int time) 
                 {
                    return super.keyChar(key, status, time);
                 }
             };
    
    
             manager = new VerticalFieldManager(HORIZONTAL_SCROLL )
             {
                 protected void paint(Graphics g) 
                    {
                     int x = this.getHorizontalScroll();
                     if(textbox.getText().equals(""))
                     {
                         g.drawBitmap( x, 0, textbox_img.getWidth(), textbox_img.getHeight(), textbox_img, 0, 0 );
                     }
    
                        super.paint(g);
                    }
    }
    manager.add(textbox);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to center text over an image in a table cell using javascript, css,
I'm using JavaScript to hide an image and show some text thats hidden under
I'm using the PHP function imagettftext() to convert text into a GIF image. The
Hi there im using the following code for insert text and images, but I
I'm using an image component that has a FromBinary method. Wondering how do I
When you rotate an image using canvas, it'll get cut off - how do
Has anyone got to some good code to zoom into an image using javascript?
Is there any way to place an image inside of a text field with
I have written a CGI script that creates an image dynamically using GET data.
I need a webpart that has a plaintext field for a title, an image

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.