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
5 answers

How can I check string in textbox as integer in Visual Basic?

I have 3 textboxes (day, month, year) and I want to check if input is e.g. day has to be from 1 to 31 and so on. My code is: If InputDan.Text < "1" Or InputDan > "31" Then Warning.Text = "Not a valid day input." Else Warning.Text = "" Also I have…
Alex
  • 173
  • 3
  • 6
  • 18
3
votes
1 answer

Count number of lines in VB multiline textbox

I want to count the number of lines needed for VB multiline textbox to display the whole given string. So that I can increase height of the textbox accordingly during TextChanged event.
Abhay
  • 75
  • 1
  • 1
  • 7
3
votes
1 answer

Getting the coordinates of a character in a TextBox?

I'd like to enhance this WPF DateTimePicker control by adding an Adorner above and below the selected field, something like To do so I need to figure out the X coordinate of the beginning and end of the selection in the TextBox. How can I do that?
Qwertie
  • 16,354
  • 20
  • 105
  • 148
3
votes
2 answers

Placeholder Text in VB6

I know this is an odd one, but is there a way to emulate the placeholder text functionality in VB6? If not, does anyone know of a good OCX control I could get somewhere that will do this? I'm sure it can be programmed in with a set of functions to…
Mac-Gon
  • 240
  • 1
  • 8
  • 18
3
votes
2 answers

display non-printable chars in winforms textbox

I am trying to display non-printable characters (space, line break) in a winforms multiline textbox, a feature found in most text processing tools. I am doing this by textbox.Text.Replace(' ','·').Replace(Environment.NewLine, "¶" +…
ondrums
  • 158
  • 11
3
votes
2 answers

SQL Intellisense in WPF Textbox

I am building an application which contains Textbox. I want the Textbox to act just like SQl Server Editor with intellisense. I need help, can i make my Textbox act like a Sql Server Query Editor WITH Intellisense.
Zorro
  • 175
  • 1
  • 14
3
votes
3 answers

How do you stop a textbox showing the default context menu?

I've noticed something wierd with the WinForm TextBox's Context Menu. The TextBox control has a default context menu that has Cut, Copy, Paste and a few other things. I am trying to replace this menu with one of my own. I have created a simple test…
Martin Brown
  • 24,692
  • 14
  • 77
  • 122
3
votes
2 answers

Using JQuery onblur to set textbox value

I have a textbox with these rules: 1) I populate the textbox.text from a dictionary in session 2) If the user enters a new value, setTextBoxData will save it in the dictionary 3) On entry (on focus) the field text is blanked. 4) On blur, if the…
Bob Jones
  • 2,049
  • 5
  • 32
  • 60
3
votes
3 answers

Textbox change event not firing in chrome

I have a textbox Textbox change and keyup events are bind to two different…
user1533453
  • 55
  • 1
  • 4
3
votes
3 answers

Javascript to ckeck if user enters space in the text field

I want a script which should alert the user if space is entered in the text field.I think it requires javascript.I am writing a script in which i don't want user to enter space in the text fields.
user1656273
3
votes
2 answers

One Html Label with Two Form Inputs

If I want to associated one label with two forms inputs, say "Expiration Date" for the label for two inputs "ExpirationMonth" and "ExpirationYear", what is the best semantic approach to do this?
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
3
votes
2 answers

Bind TextBox to large string in WPF using MVVM

I am having a performance problem binding a large string to a a TextBox in WPF. In the view I am binding a TextBox's Text property to the view model's Output property which is a StringBuilder. View:
sixtowns
  • 449
  • 2
  • 6
  • 13
3
votes
2 answers

Winforms/C#: Store/Retrieve (Persist) Content of TextBoxes between 2 Runs

Is there an easiest way to simply tell Winforms (mainly TextBoxes) to persist all its content e. g. to a file without me having to loop through all the controls? I saw this in a WPF application, but am clueless (also, Google did not turn up…
Andreas Reiff
  • 7,961
  • 10
  • 50
  • 104
3
votes
1 answer

"scroll" single-line textbox

I am trying to "scroll" a single line textbox to the left while some text is selected, without changing the selection. In above picture I have a textbox A with selection of letters M to Z, but I cannot see the letters at the beginning of the…
3
votes
2 answers

How to set space between lines in a rdlc textbox

How can we set the space between lines in an rdlc textbox? Scenario: The application shall be printing a report to a pre-printed stationary sheet. One string field of the report is usually having about 400 characters of data (description input by…
Sudeep
  • 41
  • 1
  • 1
  • 3
1 2 3
99
100