textbox

Using C#, how can I read the content of dynamic created textboxes?

眉间皱痕 提交于 2019-12-24 00:44:01
问题 Hy, I have created some dynamic textboxes with standard content. Does anyone know how can I read the content of these textboxes (assuming that user modified the standard content) when I press one button? Thanks a lot. Jeff Update This is how I am creating the textboxes: foreach (string name in listOfNames) { TextBox tb = new TextBox(); tb.Text = name; tb.BorderStyle = BorderStyle.None; tb.BorderWidth = 0; tb.Font.Name = "Arial"; tb.Font.Size = 8; } 回答1: The specific will vary depending on the

Propagate programmatic text field value changes to model using Cocoa Bindings

依然范特西╮ 提交于 2019-12-24 00:43:03
问题 I tried a very simple implementation, like this: @implementation ScrollingTextField - (void)scrollWheel:(NSEvent *)event { self.doubleValue -= event.scrollingDeltaY; } @end I bound the value of the scrolling text field to some other object. Scrolling now updates the visible text on the text field just fine. However, the bound value does not change. Why does the bound value not change? Or: How can I make the bound value recognize the change? 回答1: The bound value doesn't change by Apple's

How to allow users to customize text field with styling

↘锁芯ラ 提交于 2019-12-24 00:29:48
问题 I am currently working on a project for school and am required to create a blog. Part of our assignment is to create an input field that would allow users to customize the styling of their text within the field. Although I have looked around, I have had no luck in finding what it is that I am looking for. For clarification, the goal is to create a field that resembles the field on here when creating a post (Photo included below). I am assuming that Javascript and/or JQuery is required,

How to set labels inside textfields for username and password?

人盡茶涼 提交于 2019-12-24 00:29:10
问题 I have a login form for my website. This login form have two text fields, username and password. Currently I am placing labels(username, password) just before textfields. But now I want to removed these two labels and want to show text(username, password) inside textfield. When user focuses on these textfields then texts should be removed and user can enter his desired username and password. I have also noticed that when user open a login form then font color of text(username, password)

Get data from sql query into textbox

只谈情不闲聊 提交于 2019-12-24 00:23:26
问题 Fixed it by closing the connetion at page init and then reopen at Dropdownlist. I've searched for an answer to this question but without any luck. I want to get data from a selected dropdownlist item to a textbox. I've been trying to execute this sql query without any success. Here's my code: public partial class EditContact : System.Web.UI.Page { SqlConnection connection = new SqlConnection("SqlConnection"); protected void Page_Load(object sender, EventArgs e) { } protected void Page_Init

WPF TextBox DoubleClick Event Fires when using Scrollbars rapidly

∥☆過路亽.° 提交于 2019-12-23 22:26:06
问题 I have a WPF TextBox, defined like this: <TextBox Text="{Binding Path=/Comments}" Margin="351,193.91,10,36" x:Name="txtComments" IsReadOnly="True" VerticalScrollBarVisibility="Auto" LostFocus="txtComments_LostFocus" MouseDoubleClick="txtComments_MouseDoubleClick" AcceptsReturn="True" /> This works exactly as I would like; however, when the VerticalScrollBars are visible, if you rapidly click the ScrollBar the txtComments_MouseDoubleClick event is fired. Is there any way I can change this

C# Texbox Spell Checker Check All Caps Words

萝らか妹 提交于 2019-12-23 21:38:57
问题 With the textbox spell check in WPF, it doesn't seem to check spelling for words that are capitalized. I understand that this is designed for acronyms and such so that it doesn't tag all those as misspellings and it's useful for that. However in my industry (Architecture and Engineering) there are many companies that write their notes using all capitals so that basically makes the spell checking useless... Is there any way to change the spell checker to not ignore capitalized words? 回答1: You

How do I add HTML links in C# TextBox?

血红的双手。 提交于 2019-12-23 20:43:20
问题 How can I put a link in a C# TextBox ? I have tried to put HTML tags in the box but instead of showing a link it shows the entire HTML tag. Can this be done with a TextBox ? 回答1: I would think about this a little bit. If you allow executable code in an editable control, the user, the user can execute ANY code. This is generally a bad idea. The behavior of the C# control is intentional to prevent the exact behavior that you are trying to create. A little creativity (such as parsing out links

Comma or semicolon-delimited AutoComplete TextBox

走远了吗. 提交于 2019-12-23 20:40:35
问题 I would like to have a TextBox that supports AutoComplete and lets users type multiple words separated by a comma or semicolon, offering suggestions for each word. I have a standard TextBox with textBox.AutoCompleteCustomSource.AddRange(new[] { "apple", "banana", "carrot" }); textBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend; textBox.AutoCompleteSource = AutoCompleteSource.CustomSource; Unfortunately it will only suggest for the first word. Anything typed after that and it stops

How do I make the autocomplete list for a TextBox editable?

。_饼干妹妹 提交于 2019-12-23 20:23:03
问题 I have an application with a lot of TextBox controls that use autocomplete. Each one uses AutoCompleteMode.CustomSource to get the autocomplete text from an associated AutoCompleteStringCollection . Whenever the user enters a new value in the TextBox , it gets added to the associated AutoCompleteStringCollection , and at the end of the session all of those collections get persisted to a file in the user's home directory. The problem is that there's no way to correct errors in those