Questions tagged [textfield]

A text field (or text box) is a user-interface control allowing the user to input text into a program.

A typical text field is a rectangle, often with a border. It can be either single-line or multi-line. In addition to typing, text fields allow for a variety of other activities, such as text selection (cut, copy, paste).

This GIF ("File:Textbox2.gif" on Wikimedia Commons) depicts a text field with text being entered:

A text field with the word 'Wikipedia' being typed in

4965 questions
18
votes
3 answers

Flutter: How to Keep TextField Focus on Submit?

I'm using https://pub.dev/packages/flutter_tags for a tag input. A tag is added to the array of tags by pressing submit on the keyboard and the TextInput Field cleared. Now I have the problem that with a submit the keyboard also closes. So you have…
Jakob Kühne
  • 915
  • 2
  • 12
  • 26
18
votes
6 answers

Flutter app freezes when a TextField or TextFormField is selected

I have a Flutter app that is functioning properly in all respects except when I select a TextField (or TextFormField). When I select the TextField, the cursor blinks in the TextField, but I can't type anything AND all other buttons like the…
xdevco
  • 181
  • 1
  • 6
18
votes
5 answers

SwiftUI: Is it possible to turn off predictive text for a TextField

I would like to turn off predictive text/autocorrect for a TextField in SwiftUI. Looks like this was possible in with UITextField: Disable UITextField Predictive Text I checked the Apple documentation for TextField and googled, but can't find…
dcvonb
  • 315
  • 3
  • 10
18
votes
2 answers

Is there a way to dynamically change the Flutter TextField's maxLines?

I have a TextField like this: new Flexible( fit: FlexFit.loose, child: new Container( alignment: FractionalOffset.topLeft, child: new TextField( decoration: new InputDecoration( hintText: 'Add a…
Mary
  • 18,347
  • 23
  • 59
  • 76
18
votes
4 answers

Numeric TextField for Integers in JavaFX 8 with TextFormatter and/or UnaryOperator

I am trying to create a numeric TextField for Integers by using the TextFormatter of JavaFX 8. Solution with UnaryOperator: UnaryOperator integerFilter = change -> { String input = change.getText(); if (input.matches("[0-9]*")) { …
ShadowEagle
  • 490
  • 1
  • 4
  • 15
18
votes
9 answers

JavaFX 2.2 TextField maxlength

I am working on a JavaFX 2.2 project and I have a problem using the TextField control. I want to limit the number of characters that a user will be able to enter into each TextField. However I can't find a property or something like maxlength. The…
Georgios Syngouroglou
  • 18,813
  • 9
  • 90
  • 92
17
votes
1 answer

inputProps vs InputProps in Material UI TextField

What are the differences between inputProps and InputProps? The 2 TextFields below do the same thing. When do I have to choose one over the other?
NearHuscarl
  • 66,950
  • 18
  • 261
  • 230
17
votes
8 answers

Widget rebuild after TextField selection Flutter

I'm developping a Flutter App that needed to have a form. So when the user open the app, a Splash Screen appear before the form that have the following code : import 'package:flutter/material.dart'; import '../model/User.dart'; import…
Nadox56
  • 355
  • 1
  • 2
  • 8
17
votes
3 answers

How to Serialize BigIntegerField, TextField in serializer Django

I have a model which has following attributes from django.db import models class ApiLogs(models.Model): user_id = models.BigIntegerField(null=True) ip = models.CharField(max_length=16) user_agent = models.TextField(blank=True,…
17
votes
1 answer

Any pitfalls of converting MySQL TEXT field to MEDIUMTEXT?

I understand the size/storage constraints of MySQL TEXT and MEDIUMTEXT fields, but I just wanted to make absolutely sure (before I sign off on a change) that I'm not looking at any adverse effects from converting a field with existing data from TEXT…
scooterhanson
  • 301
  • 4
  • 9
17
votes
3 answers

How get an event when text in a TextField changes? JavaFX

How can I generate a new event to handle whenever TextField's text is changed?
void
  • 731
  • 2
  • 11
  • 26
17
votes
3 answers

How to disable Button when TextField is empty?

In the following code I have a TextField and a Button. I need to disable the Button when ever the TextField is empty, so that I can avoid entering empty values to the database. How can I make the button disabled ? private VBox addVBox() { …
TomJ
  • 1,803
  • 14
  • 37
  • 57
17
votes
1 answer

Flash AS3: ReferenceError: Error #1056: Cannot create property

I am writing something in Flash/ AS3, and I came across this problem: ReferenceError: Error #1056: Cannot create property txtInput on package.name.DocumentClasss Basically I have a document class, and I can create instances of movieclips clips and…
bguiz
  • 27,371
  • 47
  • 154
  • 243
17
votes
7 answers

How to unmask a JavaFX PasswordField or properly mask a TextField?

In a UI of mine, I have a PasswordField like so (urm the one at the bottom!): I want a user to be able to check the checkbox you see in the picture and have all "secret" password characters displayed. Not much different from the option we get from…
Martin Andersson
  • 18,072
  • 9
  • 87
  • 115
16
votes
1 answer

Android - Add textview to layout when button is pressed

So right now I have a text field with a button (add+) below it. I would like to make it so every time text is entered into the Text Field, and the Add button is pressed, a new text view is added to a vertical layout below it with the text that the…
user802609
  • 799
  • 6
  • 19
  • 34