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
16
votes
6 answers

How to navigate through SwiftUI TextFields by clicking on return button from keyboard?

I'm working with SwiftUI's TextField View. Mainly I have 2 questions: In Swift, we can set Return Key(Text Input Traits) to Next for TextField from storyboard like this right? For this which modifier to use in SwiftUI? I have two Textfields, how…
Anjali Kevadiya
  • 3,567
  • 4
  • 22
  • 43
16
votes
4 answers

SwiftUI - Search in List Header

I am trying to to recreate what everyone know from UITableView with SwiftUI: A simple search field in the header of the tableview: However, the List View in SwiftUI does not even seem to have a way to add a header or footer. You can set a header…
Daniel
  • 1,473
  • 3
  • 33
  • 63
16
votes
4 answers

Aligning the text to be at the center of a textfield in Vuetify

I have a read only textfield that shows a string. The string starts from the left side of textfield as it should. I was wondering if there is a way in Vuetify to align the string to the center of textfield? UPDATE This is my code:
mha
  • 551
  • 2
  • 11
  • 22
16
votes
1 answer

Rails: How "email_field" differs from "text_field"?

I understand that text_field creates an input field of type text, while email_field creates an input field of type email. But, what is the difference between these two input types ? Say I have a client model while a client has an email. Should I use…
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
16
votes
8 answers

can't change the height of a text field in simple_form

I've tried #Default size for text inputs. config.default_input_size = 10 from config/initializers/simple_form.rb I've also tried <%= f.input :message, :input_html => {:size => 10} %> But neither of these change a single thing about how my…
Linoux
  • 181
  • 1
  • 1
  • 3
16
votes
3 answers

Java - placeholder on textfield

I'm trying to create a GUI with Swing. My problem is, I have a textfield, but I want it to have a "placeholder" (like in html). I read here and there that it can be done by overriding the paint() of the textfield. Since my code is generated I found…
Jordashiro
  • 803
  • 4
  • 16
  • 27
15
votes
8 answers

How to read UTF8 encoded file using RandomAccessFile?

I have text file that was encoded with UTF8 (for language specific characters). I need to use RandomAccessFile to seek specific position and read from. I want read line-by-line. String str = myreader.readLine(); //returns wrong text, not…
kenny
  • 2,000
  • 6
  • 28
  • 38
15
votes
3 answers

How to disable copy/paste/cut in a TextField Jetpack Compose?

I'm trying to find a simple solution on how to disable copy/paste/cut in a TextField. I did come across a couple of question but no answer.
Limun
  • 167
  • 1
  • 7
15
votes
1 answer

Material Autocomplete does not work with InputProps

I am trying to change the border of my TextField that is rendered through my Autocomplete, but when I add the InputProps prop, the Autocomplete no longer renders Chips
Arthur
  • 2,622
  • 4
  • 28
  • 46
14
votes
6 answers

How can I disable the HTML textfield using this simple jQuery?

I have this simple jQuery code to test out.