# numpad issue?

**URL:** https://tech-community.robotics.abb.com/t/numpad-issue/1930
**Category:** Developer Tools
**Created:** [June 11, 2008, 7:12pm UTC](https://tech-community.robotics.abb.com/t/numpad-issue/1930 "2008-06-11T19:12:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![tbaumg](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tbaumg](https://tech-community.robotics.abb.com/u/tbaumg)
#### Post date: [June 11, 2008, 7:12pm UTC](https://tech-community.robotics.abb.com/t/numpad-issue/1930/1 "2008-06-11T19:12:43Z")

</div>

I am having an issue using the numpad, and hope someone could point me in the right direction. To adjust a num data I open the numpad and link the Target to a textbox, I am then able to type a number into the pad and hit my “ok” button. My code then writes the data to the controller and seems to work fine.

The problem is every time I open the numpad after that. The cursor is usually moved over in the textbox, and I am not able to type anything until after I touch that textbox. I think I am overlooking something simple, but I have been struggling with this for a few days now. Any help would be greatly appreciated.

Thanks,

Toby

---

<div class="post-metadata">

### Author: ![RussD](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RussD](https://tech-community.robotics.abb.com/u/RussD)
#### Post date: [June 11, 2008, 10:18pm UTC](https://tech-community.robotics.abb.com/t/numpad-issue/1930/2 "2008-06-11T22:18:11Z")

</div>

Have you tried TextBox.Focus = True when you display the NumPad?

---

<div class="post-metadata">

### Author: ![tbaumg](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tbaumg](https://tech-community.robotics.abb.com/u/tbaumg)
#### Post date: [June 11, 2008, 10:36pm UTC](https://tech-community.robotics.abb.com/t/numpad-issue/1930/3 "2008-06-11T22:36:01Z")

</div>

Thanks for the quick response, Yes, I tried that, it is currently the last line in my routine, I’ll paste the code below:

this.tNumPadText.Text = “”;

tNumPadText.BackColor = Color.White;

tNumPadText.ForeColor = Color.Black;

this.numPad1.Target = this.tNumPadText;

this.tNumPadText.CaretVisible = true;

this.tNumPadText.Focus();

---

<div class="post-metadata">

### Author: ![RussD](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RussD](https://tech-community.robotics.abb.com/u/RussD)
#### Post date: [June 11, 2008, 11:02pm UTC](https://tech-community.robotics.abb.com/t/numpad-issue/1930/4 "2008-06-11T23:02:11Z")

</div>

try adding:

this.tNumPadText.SelectAll();

and

this.tNumPadText.SelectionVisible = True;

before CaretVisible = true

---

<div class="post-metadata">

### Author: ![tbaumg](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tbaumg](https://tech-community.robotics.abb.com/u/tbaumg)
#### Post date: [June 12, 2008, 2:32pm UTC](https://tech-community.robotics.abb.com/t/numpad-issue/1930/5 "2008-06-12T14:32:49Z")

</div>

That fixed it! Works great now! Thank you for your help.
