textfield

How do you scale a dynamic textfield in flash from the center point using as3?

纵饮孤独 提交于 2019-12-25 03:26:53
问题 I'm trying to make a text effect where on every frame the textfield increases in size and decreases in opacity. I'm using the scaleX and scaleY properties of my dynamic textfield to enlarge, but it's doing so keeping the left registration point fixed. I want to make it scale up radially outward, or with the center point fixed. Can anyone tell me how to do this? 回答1: You can easily create a wrapper for the TextField (i.e. a Sprite containing the TextField ) to enforce the registration point to

Dismiss keyboard of TextField programmatically

落花浮王杯 提交于 2019-12-25 02:23:03
问题 I know how to use the following method by Interface Builder. -(void)dismissKeyboard { [testTextField resignFirstResponder]; } In this way, when I touch the area outside the keyboard or tap the "return", the keyboard will dismiss. But I don't know how to make it all by code. Please teach me , thanks. Here's .h #import <UIKit/UIKit.h> @interface SecondViewController : UIViewController { UITextField *testTextField; } @property (nonatomic,retain) UITextField *testTextField; @end here's .m #import

App Crashes When TextField is Empty

旧城冷巷雨未停 提交于 2019-12-24 14:52:46
问题 I have tried too many things but after pressing calculate(hesapla) button app crashes everytime. For example: if (vize1.getText().toString().equals("") || fina1.getText().toString().equals("") || sort1.getText().toString().equals("")){ islem_yazi.setText("FILL THE FIELDS"); } // IT DOESN'T WORK What should I write/do? import android.app.ActionBar; import android.content.SharedPreferences; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.text.TextUtils; import

How to press a key programmatically in a TextField?

这一生的挚爱 提交于 2019-12-24 11:02:04
问题 I have a TextField , and I want to press the switch charset button programmatically. I've tried this, but I get a NullPointerException . myTextfield.addListener(new FocusListener(){ public void keyboardFocusChanged(FocusEvent event, Actor actor, boolean focused){ if(focused){ InputEvent ie = new InputEvent(); ie.setKeyCode(Keys.SWITCH_CHARSET); actor.fire(ie); } } }); This is the log cat error 回答1: You need to set the type of the event. That's what causes the NullPointerException , which you

Changing Img Src based on value entered in a Textfield

萝らか妹 提交于 2019-12-24 10:58:32
问题 I need help creating a form with the following TEXTFIELD (will be used to enter 7digit model numbers) An image placeholder (will change the image placeholder's src based on a url for example it will become src="http://yourwebsite.com/product/ TEXTFIELD .jpg) I need to somehow get the the H1 tag values from within the product's url #3 IS STILL UNSOLVED ! I'm REALLY desperate for any type of help. I've googled the entire day REALLY need assistance. Thank You ! I have some code below that helps

How to convert a string from a text input into a function in a Scala

末鹿安然 提交于 2019-12-24 06:38:02
问题 I am creating a GUI using Scala which should play a signal dependent on the algorithm but into the textField, eg. sin(2*Pi*400*t). The playing function works perfectly, however the issue is the input for the GUI. The textField takes the function and converts it to a string, now I was wondering is there a simple way to convert the string back into a function. I was considering matching the input to various valid functions, however I don't want to restrict the possible functions, as I want the

QML - How to change TextField font size

て烟熏妆下的殇ゞ 提交于 2019-12-24 03:21:15
问题 How can I set the font size of a TextField element in QML? wanna change size of the placeholderText and also for the text which the user enters. I tried with a lot of ways without luck! TextField { id: name_TextField; horizontalAlignment: Text.AlignHCenter; Layout.preferredWidth: parentCLayer.width * 0.90; Layout.preferredHeight: 50 style: TextFieldStyle { font.pixelSize: 20 // This doesn't seem to work either } placeholderText: qsTr("Your name here") } 回答1: You can use the style property to

Struts 2 textfield convert apostrophe to “&#39 ;”

♀尐吖头ヾ 提交于 2019-12-24 00:46:30
问题 I am trying to populate name text field with already saved value. Now the value can contain apostrophe. But text fields is converting apostrophe to " &#39 ; ". Eg. sdsd'sds ==> sdsd&#39 ;sds escape property for textfield is not working. What should I do? 回答1: You are getting this because of Encoding feature. To avoid this and get exactly same as you want, you have to use HtmlDecode which is available in util package of java. 回答2: You are probably escaping it server-side. Don't. Struts will

TextField in cocos2d-x 3.0 with background image, text alignment and colored shadow

醉酒当歌 提交于 2019-12-24 00:23:32
问题 I need a input text filed with: background image text aligned to center text color, shadow and shadow color options But I cannot find and appropriate one. I have investigated and found: cocos2d::extension::EditBox which has 1, but 2 and 3 are missing as I understand cocos2d::TextFieldTTF ui::UICCTextField ui::TextField The latest 3 ones don't have 2 and 3 and also are not easy to use in terms of getting input. cocos2d::Label seams to hove what I want (I can use a sprite for background), but

java - Cant change the value of a JTextfield from inside of DocumentListener methods

时光怂恿深爱的人放手 提交于 2019-12-23 16:53:43
问题 I get an "Attempt to mutate in notification" exception. 1. How can I change it ? 2. How can I get the value that was inside the TextField before the listener was triggered? EDIT: It is something like this. On the JTextfield I have this listener basePriceTF.getDocument().addDocumentListener(new DocumentListener(){ public void insertUpdate(DocumentEvent e){ if (Integer.getValue(basePriceTF.getText())<0){ basePriceTF.setText("0"); } } public void removeUpdate(DocumentEvent e){/**my implemntation