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 7838031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:57:21+00:00 2026-06-02T14:57:21+00:00

The title is a little vague. I have a form with several textboxes that

  • 0

The title is a little vague. I have a form with several textboxes that require user input. The input is all numerical. This is a touchscreen application, so when the textbox gets focus, a “numberpad” form is displayed for the user to input the number. The user’s input is displayed on the “numberpad” form.

The question: How do I get that input to be set as the text property of the calling textbox?

I know I could pass some int value then use a big switch statement when the value is to be passed, but there are around 30 textboxes. Any ideas?

  • 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-06-02T14:57:24+00:00Added an answer on June 2, 2026 at 2:57 pm

    In your NumberPad form, have a property that is your result:

    public int Result { get; private set; }
    

    When the user hits the button to save the data, assign the value and set the DialogResult for the form:

    private void btnSave_Click(object sender, EventArgs e)
    {
        Result = // whatever
        DialogResult = DialogResult.OK;
    }
    

    In the calling form, check the result and only process if it is OK (in other words, the NumberPad was saved and not cancelled):

    NumberPad pad = new NumberPad();
    if (pad.ShowDialog() == DialogResult.OK)
    {
        txtBox.Text = pad.Result.ToString();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok this might sound a little vague from the title, but that's because I
well, the title pretty much says it all. here's a little info: i have
Please excuse (or improve the title) but I have a silly little problem that's
Sorry if the title is a little vague, I have the following sceneraio: I
I have made this nice little table: testPage.cfm: <html> <head> <title>Test Page</title> <style> .blue{
Sorry if the Title is a little vague but the truth is I do
OK so that title sucks a little but I could not think of anything
OK, that title is a little unclear, but I can't think of a better
the title might be a little bit confusing, let me explain, ;) I have
Yes title is a little confusing but let me tell you what I have

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.