textfield

Flutter TextField with number keyboard, comma is needed instead of period (Only iOS)

我们两清 提交于 2019-12-06 13:28:46
I want to create a TextField in Flutter. The TextField is for decimal numbers. So i set keyboardType: TextInputType.numberWithOptions(decimal: true) . Now I get a number keyboard on iOS, but this number keyboard has a period (.) instead of a comma (,). The language of the iOS device is German . My current TextField: TextField( key: Key("pricePerLiter"), style: TextStyle(color: inputTextColor), textAlign: TextAlign.end, focusNode: pricePerLiterFocusNode, keyboardType: TextInputType.numberWithOptions(decimal: true), decoration: inputDecoration.copyWith( suffixText: "€", errorText:

Monotouch: How to update a textfield in AppDelegate partial class?

a 夏天 提交于 2019-12-06 12:42:07
问题 I have a textfield (created using IB) that has an outlet connected to App Delegate. Accessability is enabled. I have a class for IAP, where I need to update that textfield. It is not visible from my code. How do I do this? 回答1: This is pretty simple to do, you need to do 2 things: 1: Expose the outlet in a public property, inside your appdelegate: public class AppDelegate : NSObject { public UITextField PublicField { get { return outletName; } } } 2: Access your AppDelegate from another class

AS3: TextField Focus

一曲冷凌霜 提交于 2019-12-06 11:16:12
I'm trying to handle a focus event on a TextField so I can select all the text when focusing (tab or click). Seems like I'm doing something wrong here ? txtTextField.addEventListener(FocusEvent.FOCUS_IN, handleFocusIn); function handleFocusIn() { //select all text here } I needed the same thing, to select the contents of a textfield when it receives focus. I tried: A) Simply selecting after a FocusEvent. This doesn't seem to work (my guess is that FocusEvents are fired before the mouse click is being processed, which in turn will undo the selection). B) Selecting on every mouse click. This

How to change the textfield cursor colour in Cordova iOS project

北城以北 提交于 2019-12-06 11:15:31
I have a blue background in my Cordova based iOS project due to which my cursor is not properly visible in iPhone device.So if anyone faced this please tell me How to change the textfield cursor color in Cordova iOS project or if any HTML attribute to change this tint color textfield code in index.html: <input type="text" placeholder="First Name" id='regFName' /> Sujania - you just need to add the class "cursor" to your input type. <input class="cursor" type="text" placeholder="First Name" id='regFName' /> Then the CSS will apply as you would expect! Suresh Ratten Solution 1: Setting the

pass data from tableviewcontroller to another tableviewcontroller in swift

£可爱£侵袭症+ 提交于 2019-12-06 06:19:10
I have a form I am creating this form gets filled with textfields the user inputs. After answering all the questions a button pops up to save. I am having a problem making this tableviewcontroller to pass the data to a new tableviewcontroller. I'm stuck and not sure how to go about this. import UIKit class TableViewController: UITableViewController, UITextFieldDelegate { @IBOutlet weak var saveBtn: UIButton! @IBOutlet var firstNameField: UITextField! @IBOutlet var middleNameField: UITextField! @IBOutlet weak var lastNameField: UITextField! @IBOutlet weak var addressField: UITextField!

New BlackBerry text selection mode

柔情痞子 提交于 2019-12-06 06:12:28
In recent versions of OS6, text selection has changed. I am using an ActiveRichTextField and in BlackBerry OS pre-6.0 as well as older versions of 6.0, such as 6.0.0.246, the focus would move though each character with the inverse block showing current position. The context menu has "Select" as an option, and uses the current focus position as the selection start, and any focus movement would mark the other end of the selection. With 6.0.0.526, the focus no longer draws an inverse block on the selected character, and left-right movement on the text field does not work. Also, the context menu

java: validating that all text fields in GUI are completed

蓝咒 提交于 2019-12-06 06:09:49
问题 I am trying to create a GUI that allows someone to set up an account. I would like to validate that all the text fields are complete when the create account button is pressed. What is the best way to do this? I am attaching my code but my validation that the text fields are complete is not working. see code below: public class GUIaccounts extends JFrame{ private JLabel name; private JLabel initDeposit; private JLabel chooseAccount; private JLabel empty; private JTextField nameTextField;

How do you prevent arrow up/down default behaviour in a TextField?

纵然是瞬间 提交于 2019-12-06 05:34:25
问题 I am making a input field for keywords, and while the users writing I'm displaying suggestions for keyword on a list underneath the caret position. The input field is single line, so I am using the arrow up/down key to select a suggestion and Enter to insert it. And it's mostly working, with the big exception that the up/down key also changes the caret position to the begining/ending of the TextField . I've tried using preventDefault() and stopImmediatePropagation() in the KeyboardEvent.KEY

AS3 maximum textfield's width

吃可爱长大的小学妹 提交于 2019-12-06 04:49:37
问题 How to set Textfield's maximum width? I need auto-width until it gets to maximum width, so long text will break into lines. 回答1: var maxWidth:Number = 200; textField.multiline = false; textField.wordWrap = false; textField.autoSize = TextFieldAutoSize.LEFT; textField.text = "Lorem ipsum"; if (textField.width > maxWidth) { textField.multiline = true; textField.wordWrap = true; textField.width = maxWidth; } 来源: https://stackoverflow.com/questions/10739154/as3-maximum-textfields-width

JavaFX binding between TextField and a property

会有一股神秘感。 提交于 2019-12-06 03:03:47
If you create a binding between a JavaFX TextField and a property, then this binding is invalidated on every keystroke, which causes a change to the text. If you have a chain of bindings the default behavior could cause problems, because in the middle of the editing values may be not valid. Ok, I know I could create an uni-directional binding from the property to the textfield and register a change listener to get informed when the cursor leaves the field and update the property manually if necessary. Is there an easy, elegant way to change this behavior so that the binding is only invalidated