textbox

How can I force input to uppercase in an ASP.NET textbox?

↘锁芯ラ 提交于 2019-12-17 09:29:44
问题 I'm writing an ASP.NET application. I have a textbox on a webform, and I want to force whatever the user types to upper case. I'd like to do this on the front end. You should also note that there is a validation control on this textbox, so I want to make sure the solution doesn't interfere with the ASP.NET validation. Clarification: It appears that the CSS text transform makes the user input appear in uppercase. However, under the hood, it's still lower case as the validation control fails.

How Do I Give a Textbox Focus in Silverlight?

╄→尐↘猪︶ㄣ 提交于 2019-12-17 09:22:16
问题 In my Silverlight application, I can't seem to bring focus to a TextBox control. On the recommendation of various posts, I've set the IsTabStop property to True and I'm using TextBox.Focus(). Though the UserControl_Loaded event is firing, the TextBox control isn't getting focus. I've included my very simple code below. What am I missing? Thanks. Page.xaml <UserControl x:Class="TextboxFocusTest.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas

How to check if a text field is empty or not in swift

三世轮回 提交于 2019-12-17 08:20:07
问题 I am working on the code below to check the textField1 and textField2 text fields whether there is any input in them or not. The IF statement is not doing anything when I press the button. @IBOutlet var textField1 : UITextField = UITextField() @IBOutlet var textField2 : UITextField = UITextField() @IBAction func Button(sender : AnyObject) { if textField1 == "" || textField2 == "" { //then do something } } 回答1: Simply comparing the textfield object to the empty string "" is not the right way

How to check if a text field is empty or not in swift

亡梦爱人 提交于 2019-12-17 08:20:00
问题 I am working on the code below to check the textField1 and textField2 text fields whether there is any input in them or not. The IF statement is not doing anything when I press the button. @IBOutlet var textField1 : UITextField = UITextField() @IBOutlet var textField2 : UITextField = UITextField() @IBAction func Button(sender : AnyObject) { if textField1 == "" || textField2 == "" { //then do something } } 回答1: Simply comparing the textfield object to the empty string "" is not the right way

Max Char in TextBox C#?

浪尽此生 提交于 2019-12-17 07:39:46
问题 Just wondering how many char can C# Textbox multiline hold? 回答1: Look at the MaxLength property of the TextBox - it stores the maximum number of characters the control can take; as per the documentation, it is changeable. Usually the default is big enough, though. (Although I imagine that since you're asing the question, it may not be!) From the docs, you can see that the maximum value for MaxLength is 2147483646 . This is, of course, limited by the memory of the target machine. 回答2: The

Textview wrap around View [closed]

醉酒当歌 提交于 2019-12-17 07:25:18
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 8 months ago . I'm trying to make my horizontal layouts take advantage of the room available. In an info showing activity I have a 'fact box' followed by a large box of text. I'd like the infobox to float right, similar to the following picture. Is this possible using the android TextView api?

How can I unmask password text box and mask it back to password?

老子叫甜甜 提交于 2019-12-17 06:14:53
问题 How can password textbox that set to : password_txtBox.PasswordChar ="*" to be unmasked ( from checkbox ) and then mask again without loosing the string inside the textbox 回答1: Just set the property to '\0' (which is the default value) to not mask characters. Source: http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.passwordchar.aspx Note: notice that '\0' is different from '0'. The first one is the null character, white '0' is the character that will be displayed as 0. 回答2

Change color and font for some part of text in WPF C#

我与影子孤独终老i 提交于 2019-12-17 05:02:00
问题 Is there a way to change color and font for some part of text which I want to put on TextBox or RichTextBox. I am using C# WPF. For example richTextBox.AppendText("Text1 " + word + " Text2 "); Variable word for example to be other color and font from Text1 and Text2. Is it possible and how to do this? 回答1: If you just want to do some quick coloring , using the end of the RTB content as a Range and apply formatting to it is maybe the simplest solution, e.g. TextRange rangeOfText1 = new

Text box with line wrapping in matplotlib?

寵の児 提交于 2019-12-17 04:45:47
问题 Is it possible to display text in a box through Matplotlib, with automatic line breaks ? By using pyplot.text() , I was only able to print multi-line text that flows beyond the boundaries of the window, which is annoying. The size of the lines is not known in advance… Any idea would be much appreciated! 回答1: The contents of this answer were merged into mpl master in https://github.com/matplotlib/matplotlib/pull/4342 and will be in the next feature release. Wow... This is a thorny problem...

How to automatically select all text on focus in WPF TextBox?

隐身守侯 提交于 2019-12-17 02:39:10
问题 If I call SelectAll from a GotFocus event handler, it doesn't work with the mouse - the selection disappears as soon as mouse is released. EDIT: People are liking Donnelle's answer, I'll try to explain why I did not like it as much as the accepted answer. It is more complex, while the accepted answer does the same thing in a simpler way. The usability of accepted answer is better. When you click in the middle of the text, text gets unselected when you release the mouse allowing you to start