textbox

Chemical symbol support on a textbox

I am developing an application that needs some kind of subscript and superscript support to display text that refers to chemical formula, if I do it in a textbox (winforms) and want for example show water formula, it would appear as H20 rather than H(subscript 2)O (sorry I coudn't find how to do it here). How could this be done? Thanks. ...

Onclick text disappears in chrome but not in mozilla

Hi there, I have search functionality in my app, in which when user clicks in textbox, the text in the text box disappers. This works perfectly in chrome(6.0) but does not disappear after click in mozilla firefox(3.6) why? // here is the code: echo "Search: "; echo "<input type=\"text\" class=\"smalltxt\" name= \"srcht...

WPF: Custom TextBox control not using ErrorTemplate

Hey everyone! For the life of me I can not get my Validation.ErrorTemplate showing for my custom Textbox control. I tried adding an AdornerDecorator out of desperation because I read that helps sometimes. If anyone can help point me in the right direction, that would be amazing. I uploaded a sample project if someone would rather see...

Need a numeric only windows control TextBox

Hello! I am creating an old-school dialog in c# using a System.Windows.Controls.TextBox . Is there an easy way of limiting text input in this box to numeric only? Thanks! ...

Inconsistent behaviour when attempting to highlight C# TextBox

I'm building a C# WinForms program, and my textboxes do not allow the user to highlight the text consistently throughout the program. In some places, the highlighting works normally: you type something in the box, click and drag over some text, and it highlights where you dragged. In other places, clicking and dragging does not select ...

C# Bind TextBox To Specific Row Of DataTable

Hello there, I am building a simple C# application that allows the user to edit the rows of a table in a database. The interface is very simple, it is basically a list of rows and a few buttons. Selecting a row and pressing the "Add" button pops up a new form with text boxes for each column. I want those columns to be populated with the...

WPF- Problem with TextBox in DataTemplate.

I am working on an application where Repository objects are displayed via a DataTemplate that contains a modified version of a TextBox, which supports binding to the SelectionStart, SelectionLength, and VerticalOffset. The DataTemplate looks like this: <DataTemplate DataType="{x:Type m:Repository}"> <controls:ModdedTextBox x:Name="tex...

WPF textbox usercontrol containing items, not simple text (for adding email recipients)

Hi, does anybody know of any usercontrol that would function well as a textbox for entering email recipients. The control would appear as a simple textbox. When a user would enter some text a drop down list of matches would be displayed. When he would select an item from the list, this item would be added to the textbox. If the user wo...

Validating numeric formats in Win Forms

I have a number of text boxes on a win forms control that need their input validating. How do I validate for a number in the following format nn.nn also, how do I validate that a number is a positive integer thanks ...

Hide caret in WPF TextBox

Is there a way to hide the cursor in a WPF textbox? I know there is Cursor="None" but that only affects the mouse cursor. I want to hide the "text cursor". ...

gridview problem

Hi guys, i have a problem with my gridview contains a textbox to set a date. <asp:gridview ID="Gridview1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" CellPadding="8" ForeColor="#333333" GridLines="None" CellSpacing="5" Height="361px" Width="748px">...

text-align attribute causing error in IE

in my asp.net application if I add text-align:right; to any text box , the focus is not coming on that textbox.what shoul I do? ...

On text changed in Javascript

Hi, i need to be able to able to detect when any character is entered into a textbox in Javascript, and clear another corresponding textbox. I have used the onfocus method for this but when tabbing between textboxes to get to submit, it removes the data and I don't want it to. What methods are there I can use to trigger a JS event when ...

chaning background color of a text box

i have a dropdown list and text box. i disabled both controls using code behind. now, at one sight we can understand the dropdown list is disabled , because the background color of drop down list is changed automatically. i want to make that same background color to the text box control too. But i dont know what color code is that. i am...

Replacing an asp control at runtime

I have an existing .NET 1.1 dll that I do not have the source code for. It contains the code-behind for a asp.net page containing various form controls including a third party text editor that I no longer want to use. I want to replace the text editor with a simple asp:Textbox but the existing textbox is baked into the old assembly. How ...

How to implement an application-wide strategy to force text to upper case?

I am using .Net (C#, WinForms, Linq to SQL, SQL Server 2008) to develop a new line-of-business application that will replace a crufty old Foxpro application. I did not write the old app, but do provide support for it, and I am the in-house developer for the new app. One of the design decisions that was made years ago with the Foxpro app...

c# Interrupt an executing Key event from a TextBox at the next key event

Hi All, I am using the input from a TextBox to filter information displayed in a ListBox. I want the filtering to occur each time a key is pressed. The problem I am faced with is that if the user types a second, third etc. character, the filter will carry on through for each of the key presses. E.g. The user types 'a' and the filtering...

TextBox value is not updating in VS 2008, C# .NET

I'm using following DropDownList event to select an employee from MS SQL Server 2005 and showing the employee's information on TextBox. protected void employeeDropDownList_SelectedIndexChanged(object sender, EventArgs e) { EmployeeDAL employeeDAL = new EmployeeDAL(); ...

Textbox with "new line"

We tried several ways to make a textbox to accept the "enter", newline, etc.. But we are still facing the same problems. Most of the "Third party" controls allow the user to format the text as he wants. Eg, add color, font, table, etc.. However, for most stylish websites, we do not want to allow the user to format the text that way. But...

Dynamic event of textbox

Hi. How do you make an event dynamically? Like for example, I'm making a notepad with tab support for practice, and for every new tab, a text box is made dynamically. How can I make an event (TextChanged for example) for these text boxes? Thanks. ...