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
1
vote
1 answer

SwiftUI - Detect taps in a disabled SecureField?

I am writing an iOS app using SwiftUI. As part of the data presented, I need to have a password field with a show/hide button that toggles between hidden/visible. To do this, I'm using a combination of SwiftUI's SecureField and TextField controls.…
Shadowman
  • 11,150
  • 19
  • 100
  • 198
1
vote
1 answer

Update Value In TextField And Have Its Array Index Update Accordingly

I am having trouble updating values in an array that are displayed via a for each loop. These values are displayed in a text field. The code in question struct EditItemView: View { @State var recipeStep: [String] @State var stepInfo: String =…
nickreps
  • 903
  • 8
  • 20
1
vote
0 answers

flutter- put cursor on a textfield using local offset

Flutter textfield automatically puts cursor on the desired position when one simply taps on it. However, I do not know how to achieve this effect when the user clicks on it for the first time, since I am just making the textfield visible. I have the…
Y K
  • 61
  • 1
  • 3
1
vote
1 answer

change color of some words in a text field in flutter (not all; some)

How can I change some words color in a text form field in flutter such as any IDEs android studio , VS , VS code and other . I would write a small Compiler
Huseyn
  • 372
  • 1
  • 7
  • 20
1
vote
0 answers

I am making a calculator that keeps all the different sums on the screen using flutter. Not sure how to approach this

I have been trying not to have ask but I need some help. I am building my first flutter app. It's a calculator and I can get a basic one working without problems I am even getting it to evaluate with each key press, whether it be from my numbers…
1
vote
1 answer

how to make the text field next to the label in GUI

import java.awt.*; import javax.swing.*; public class guiAs { public static void main (String args [] ) { JFrame frame = new JFrame (); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(new Dimension…
Zahra Alameri
  • 11
  • 1
  • 3
1
vote
1 answer

How to determine which Textfield is being changed in SwiftUI

I have the following 2 textfield as shown in my code my question how can I differentiate which text field is being changed TextField("", text: $phoneAuthViewModel.firstCodeField) .frame(width:40, height: 48, alignment: .center) …
Ahmed
  • 1,229
  • 2
  • 20
  • 45
1
vote
1 answer

new to swiftUI. Is there a way to show a blank TextField with the grayed out prompt for a numeric entry

I am trying to get numeric input via the TextField. See related code below. The display does not show the TextField with the grayed out 'item1:'. It shows the initialized value of 0 instead. deleting the 0 does show the TextField prompt. Trying to…
sk65plus
  • 159
  • 2
  • 9
1
vote
1 answer

SwiftUI: TextField conditional validation

The user can supply some numerical input using TextFields. If a picker is set to "plot" then any valid number is okay but if it's set to "map" then the validation must limit the number between (in this case) -180 and +180. Good numbers display a…
Magnas
  • 3,832
  • 5
  • 33
  • 48
1
vote
1 answer

RenderDecoratedBox needs compositing size:Missing

The relevant error-causing widget was: Container file:///home/bhavesh/AndroidStudioProjects/AudioShow/lib/pages/welcome/phone.dart:124:12 When the exception was thrown, this was the stack: #2 RenderBox.size…
1
vote
1 answer

I want to add $ sign to TextField in SwiftUI

Hi I want to add $ sign to a TextField when a user is typing. This is my current code. ZStack(alignment: .leading) { if price.isEmpty { Text("Enter total budget") } HStack { TextField("", text: $price) …
David S
  • 55
  • 7
1
vote
2 answers

Flutter TextFormField. How to stick validation text inside TextFormField

How to stick validation text inside TextFormField. By default it goes below the text field I want like this But it shows like this I have looked in various sources, but did not find a suitable answer is there any way to show the validation text…
S.A.R
  • 47
  • 6
1
vote
1 answer

Jetpack compose: Add drawable to start of TextField

In the code shown below, I have a TextField that accepts user input. How do I add a drawable to the start or end of the TextField? I can't find any attribute for setting drawableStart or drawableEnd. var text by rememberSaveable{ mutableStateOf("")…
Taslim Oseni
  • 6,086
  • 10
  • 44
  • 69
1
vote
2 answers

Vaadin14: How to change width of TextField label (caption)?

Using Vaadin14 I want to change the width of the label (caption) of the TextField. With the default value the caption is only partially displayed even if I set the size of the TextField to "setSizeFull". I tried the following (similar to the…
Natalie
  • 445
  • 2
  • 5
  • 18
1
vote
0 answers

Flutter show message when wrong character entered on the TextField

I have TextField with InputFormatter filtering input: TextField( onChanged: _onChangedNumber, inputFormatters: [ UpperCaseTextFormatter(), FilteringTextInputFormatter.allow( RegExp(r'[ABCDEFabcdef0-9]+'), ) ], controller:…
K.Amanov
  • 1,278
  • 14
  • 23
1 2 3
99
100