textfield

Vaadin TextField action at every key pressed

℡╲_俬逩灬. 提交于 2019-12-11 01:44:22
问题 In Vaadin 7 there are no KeyListener in TextField only on EnterKey press. I'm looking for an add-on which contains a SuperImmediateTextField but compatible with Vaadin 7. I use Vaadin version 7.1.8 回答1: You can use TextChangeListener. For example: // Text field with maximum length final TextField tf = new TextField("My Eventful Field"); tf.setValue("Initial content"); tf.setMaxLength(20); // Counter for input length final Label counter = new Label(); counter.setValue(tf.getValue().length() +

Saving an integer in core data

天大地大妈咪最大 提交于 2019-12-11 00:07:08
问题 Overview I need to save several TextFields into CoreData, but only the first one (Seen as pickerView below) saves and prints correctly. The others do not save correctly, for instance, when I try to save the integer ones, I get an error saying that they cannot take a String, which makes sense. I just cannot find a way to fix the integer-string issue. The other error occurs when I attempted to cast everything as a string ( mainly because I won't need to do any arithmetic on it, so it doesn't

Numeric keypad by default using libgdx

吃可爱长大的小学妹 提交于 2019-12-10 21:37:06
问题 I have 3 TextField s to introduce the day, month and year. At the moment i show the KeyPad , but the user needs to switch to the numeric KeyPad manually. How can I set up a numeric keypad by default for a textfield in libgdx? 来源: https://stackoverflow.com/questions/22982226/numeric-keypad-by-default-using-libgdx

prompttext in textfield of javafx 2 hides on focus after some java 7 update

老子叫甜甜 提交于 2019-12-10 21:15:59
问题 i've been making simple javafx 2 gui application and found that prompttext in textfield of javafx 2 hides as soon as the textfield gets focus. this wasn't this way some updates back. prior to this update, the textfield showed the prompttext until some text is typed into. this isn't good and really need a workaround for this. 回答1: I just solved this same issue by applying particular CSS rules to text inputs. Here's what I used (which should apply to all text-inputs) .text-input, .text-input

Swing active rendering efficiency or how to combine active rendering with gui widgets

China☆狼群 提交于 2019-12-10 20:49:09
问题 Continuing from a previous question, I keep searching for the optimal way to combine active rendering with textfields in Java. I tried several options, using BufferStrategy, VolatileImage or overriding update() and paint() in standard AWT, but I ended up using Swing. I'm posting the current state of affairs here just in case someone happens to have new insights based on my code example, and perhaps others who are working on a similar app might benefit from my findings. The target is to

How do I change color of a textfield using ExtJS?

血红的双手。 提交于 2019-12-10 18:49:38
问题 I would like to change the color of a ExtJS textfield, but I don´t succeed. The label is the component that gets the color: var textfield= Ext.create('Ext.form.Text', { id: 'textfield', name: 'name', fieldLabel: 'Name', style: 'background-color: #ddd;', allowBlank: false, }); Ext.create('Ext.form.Panel', { title: 'Contact Info', width: 300, bodyPadding: 10, renderTo: Ext.getBody(), items: [textfield] }); Example: http://jsfiddle.net/3ZZcZ/ How do I change the color? 回答1: You need to set

In Material-ui when do we use Input vs. Textfield for building a form?

孤者浪人 提交于 2019-12-10 17:22:44
问题 Maybe this is just a basic question, but so far have not found any reasonable explanation. I am a beginner in react and using material-ui very recently. I am not very clear on when to use an Input vs. Textfield for building a form? Looking at documentation, it feels like TextField is a superset of what Input can do, but not sure. Material-ui site uses examples for text field and input both, without stating benefits of one over the other and any use cases. Please suggest. 回答1: For most use

Programmatically unfocus a TextField?

回眸只為那壹抹淺笑 提交于 2019-12-10 15:24:42
问题 On my view I only have one editable content: Text in a TextField. The problem is that as a user one never gets rid of the focus (because there is nothing else to focus on), once the TextField is focused. I want to remove the focus from the TextField when the user presses Enter. I know how to react to the Enter key being pressed, but I don't know how to unfocus a control/TextField programmatically? Thanks for any hint! 回答1: I admit I crossposted, but I got a reply there which I want to share

iOS 8 Today Extension: Is it possible to add editable text field?

删除回忆录丶 提交于 2019-12-10 13:38:10
问题 I am trying to create a simple Today Extension. I was able to add a label wherein the value can be updated via the main app. Now, I am exploring the possibility to update the value in main app via the extension. However, when I tried to add a textfield, I cannot input anything. Is this a limitation of the extension? If not, can you please guide me how to accomplish this? Thank you very much! 回答1: Unfortunately, it is a limitation. It says in Apple's extension programming guide: Because user

How to check if textfield is empty?

随声附和 提交于 2019-12-10 12:54:38
问题 for my JavaFx application I want to check if the TextFields are empty, and if so, alert the user. These are the TextFields: VBox fields = new VBox(); Text usernametext = new Text("User name"); TextField user_name = new TextField(); Text firstnametext = new Text("First name"); TextField first_name = new TextField(); Text lastnametext = new Text("Last name"); TextField last_name = new TextField(); Text ibantext = new Text("IBAN"); TextField iban = new TextField(); Text passwordtext = new Text(