Questions tagged [textbox]

A textbox is a graphical user interface element which allows for simple input text, usually only a single line of text.

A text box, text field or text entry box is a kind of widget used when building a graphical user interface (GUI). A text box's purpose is to allow the user to input text information to be used by the program. User-interface guidelines recommend a single-line text box when only one line of input is required, and a multi-line text box only if more than one line of input may be required. Non-editable text boxes can serve the purpose of simply displaying text.

A typical text box is a rectangle of any size, possibly with a border that separates the text box from the rest of the interface. Text boxes may contain zero, one, or two scrollbars. Text boxes usually display a text cursor (commonly a blinking vertical line), indicating the current region of text being edited. It is common for the mouse cursor to change its shape when it hovers over a text box.

Wikipedia article: https://en.wikipedia.org/wiki/Text_box

Alternatively text box referred to as a text field, a text box is a section of a page that enables a user to enter text. Text boxes are often used on the Internet for pages that require input from a user. Below are some examples of text boxes you are likely to encounter.

One-line text box

A one-line text box is often used when only a few words, such as a name, are required.

single line

Scrolling text box

A scrolling text box allows a user to enter lots of data and usually scroll up, down, left, or right to view the text in the box.

multi line

In HTML, a textbox can be made with either <input type=text></input> or <textarea></textarea>.

12672 questions
3
votes
2 answers

Convert large number to two bytes in C#

I'm trying to convert a number from a textbox into 2 bytes which can then be sent over serial. The numbers range from 500 to -500. I already have a setup so I can simply send a string which is then converted to a byte. Here's a example:…
LAK132
  • 193
  • 1
  • 10
3
votes
3 answers

WPF TextBox Move Cursor and Change Focus

This is a weird one and I don't really even know what to search for, but trust me I have. I have a text box and bound to its OnTextChanged event is the below method. The purpose here is to give the text box focus, move the cursor to the end of the…
Skinner927
  • 953
  • 2
  • 13
  • 25
3
votes
3 answers

How to convert lower case to upper case in WPF by XAML?

I tried to convert upper case to lower case by XAML in WPF like below: I want to achieve the same scenario with TextBlock, Label and Button. How can I do it?
CHANDRA
  • 4,778
  • 8
  • 32
  • 51
3
votes
1 answer

How do I insert text into textbox from line in file in multiple textboxes?

I am trying to do something but I haven't found anything on google since I don't know how to word it to get the right results. I have a Form with 9 TextBox controls, and a PlainText file with 9 lines of text. I want to click a button which will then…
jay_t55
  • 11,362
  • 28
  • 103
  • 174
3
votes
1 answer

highlight text in 2 textboxes at the same time

I am trying to create a packet analyzer for an online game using C# and I am new to c#. I have 2 RichTextBoxes, 1 shows the packet in bytes and the other one shows the packet in ANSI. Here is what I want to achieve: When I select(highlight) data in…
0x64
  • 124
  • 8
3
votes
3 answers

how to change font style of text in textbox on click?

how can i do this using javascript? my textbox has a default value which is italic but when it is clicked the textbox will be cleared and the fontstyle should be normal.
noob
  • 4,699
  • 10
  • 33
  • 32
3
votes
2 answers

Using a DataSource with a TextBox

I normally program in C++, so all this DataSource/DataSet/Binding stuff is confusing the hell out of me. Hopefully you guys can help. Basically I'm writing an editor for an XML-based file format (specifically, OFX, for financial data). I've used…
Ben Hymers
  • 25,586
  • 16
  • 59
  • 84
3
votes
2 answers

WPF Simple TextBox Binding - Dependency Property Never Touched

I have a TextBox and I'm trying to bind it to a DependencyProperty. The property is never touched on load or when I type in the TextBox. What am I missing? XAML
jamesrom
  • 866
  • 3
  • 10
  • 19
3
votes
1 answer

A Multi-Line TextBox with Top Vertical Alignment

I'm trying to create a multi-line TextBox to allow the user to enter text. I have:
Nick
  • 25,026
  • 7
  • 51
  • 83
3
votes
2 answers

Windows forms textbox or c# string native method for checking non-alphanumeric character

Is there a windows form textbox or c# string native member method that checks if its contents have any non-alphanumeric character? or do I have to do it manually? EDIT: I used @Habib's answer and added so that white spaces are checked as well, and…
Mikk
  • 455
  • 1
  • 13
  • 19
3
votes
1 answer

Setting the Control Source of a textbox VBA

In my Access 2007 Form, I was previously successful in setting the controlSource of a textbox, directly in the properties window, using this code =UCase(Left([txtLName],6) & "_" & Left([TxtFName],1)) However, in an attempt to hard-code this into…
Paolo Bernasconi
  • 2,010
  • 11
  • 35
  • 54
3
votes
2 answers

Why can I not change textbox background after applying style?