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

  • Home
  • SEARCH
  • 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 1040409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:13:13+00:00 2026-05-16T15:13:13+00:00

How can I add a textbox so a user can enter numeric values into

  • 0

alt text

How can I add a textbox so a user can enter numeric values into my form? I need the borders of the textbox control to be visible at all time.

Thanks.

  • 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-16T15:13:14+00:00Added an answer on May 16, 2026 at 3:13 pm

    You should implement your own class, inherited from TextBox and override void paint(Graphics g) method.

    Smth, like that, sorry i write from mobile:

    public void paint(Graphics g)
    {       
        // set color
        g.setColor(0x555555);
        // draw 100*100 rectangle 
        g.drawRect(0, 0, 100, 100);
        // dont forget to invoke 
        super.paint(g);
    }
    

    If you dont want use overriding,
    In OS 4.6+ you can use Border and BorderFactory classes (search in All Classes list).

    // Each integer represents the amount of space between the box and border
    // The four parameters of an XYEdge object represents each edge, 
    XYEdges thickPadding = new XYEdges(10, 10, 10, 10);
    
    // Sample text field with a thick and solid rounded border
    // and single solid colour background.
    RichTextField simpleField = new RichTextField("Solid rounded border, solid background");
    
    // Create border and background objects 
    Border roundedBorder = BorderFactory.createRoundedBorder(thickPadding, Border.STYLE_SOLID);
    
    // Set the objects for use
    simpleField.setBorder(roundedBorder);
    
    // Add the field to the screen
     add(simpleField);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 534k
  • Answers 534k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use the date command with a format like this: date… May 17, 2026 at 12:53 am
  • Editorial Team
    Editorial Team added an answer Yes, this is possible by using the XmlAttributesOverrides class. It… May 17, 2026 at 12:53 am
  • Editorial Team
    Editorial Team added an answer Is your code running inside an addon? You could use:… May 17, 2026 at 12:53 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm using system.net.mail and have a textbox that users can enter their email address
We have an ASP.NET form with the following doctype:- We need to add autocomplete=off
You can only have one form runat=server per page apparently. My page has one
I have 2 asp.net textboxes in an update panel. Both textbox controls have some
I have the following requirement for creating a user profile in my application: User
In a textbox of a userform in VBA, I would like to enable the
I have a little problem and I'm hopping that you can help me solve
I have a javascript code for textbox that will put commas on in digits
Here is the deal: I have a RichTextBox control and it works fine. The
How can I create xml file with this format using c#? <?xml version=1.0 encoding=utf-8

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.