textbox

C# textbox cursor positioning

I feel like I am just missing a simple property, but can you set the cursor to the end of a line in a textbox? private void txtNumbersOnly_KeyPress(object sender, KeyPressEventArgs e) { if (Char.IsDigit(e.KeyChar) || e.KeyChar == '\b' || e.KeyChar == '.' || e.KeyChar == '-') { TextBox t = (TextBox)sender; bool bHandled =...

Render asp.TextBox for html5 input type="date"

Hello. I don't know if it has been asked before, couldn't find it either. Is it possible to control the type of the input text that is rendered by an asp:TextBox? I would like to change it to <input type="date"> any suggestions or comments are welcome, thanks ...

How to place text on top of image in ReportViewer

I feel very silly asking this, since it seems like it just should work, but I cannot make it work and cannot find anything in the documentation about this. The problem: I'm developing an application in Visual Studio 2010 that is utilizing ReportViewer, rendering the report locally. In the report designer, I place a textbox on top of an ...

Comparing textbox value to database

HI ! I would like to compare values from a textbox with data from a table. I tried this code but i got the error that the input string was in the wrong format! code: string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=save.mdb"; try { database = new OleDbConnection(connectionString); database.Open(); ...

Reading text out of textbox in Radgrid

I have a Radgrid with 2 Textboxes and 2 DatePickers. The idea is that I have a grid with a Property name, value, valid from and until. I'm filling the first Textbox myself, the user has to fill in the value, from and until. Filling in the propertynames: (In the pageload) foreach (String s in testProperties) { DataRow dr = dt.NewRow(...

how to lose control from text box when clicked outside

I have a textbox in a windows form. Currently the focus is on the textbox and i enter some text. Now I click outside the textbox but within the window. This action does not make the text box to lose the focus. The cursor still blinks in the text box. If the click was on another control then the text box would lose the control. How would...

Hide overflow in Silverlight TextBox

I have a Silverlight TextBox control that is inside of a Grid column with the width set to 'Auto', so the TexBox's width expands/contracts with the browser window is resized. Unfortunately, when the number of characters entered into the textbox exceeds the textbox's width, the textbox grows to accommodate it. Are there any properties ...

Retrieve a TextBox element dinamically created and Focus it

Hi, I have a collection (VariableValueCollection) of custom type VariableValueViewModel objects binded with a ListView. WPF Follow: <ListView ItemsSource="{Binding VariableValueCollection}" Name="itemList"> <ListView.Resources> <DataTemplate DataType="{x:Type vm:VariableValueViewModel}"> <Grid> <...

vb.net, How can I limit a textchanged event for a textbox to keyboard input only?

Hi everyone, Please allow me to explain what I have and what I am trying to achieve. I have a textbox (called txtb1) and a button under it (called btn_browse) on a winform in a vb.net project. When the user clicks the button a folder browser dialog appears. The user selects his desired folder and when he/she clicks 'ok' the dialog clo...

Visual Studio 2010 C# .NET textbox restrictions

if user entered "!" "?" "," in textbox and press button, this person see ERROR message in label. how can make that? and what is the code? ...

get text from running application window (osx)

Hi, I'm very very new to OSX/UNIX and i was wondering how i would go about getting a certain text from a application window. Explanation: App1 is running, it has a textfield with changing data. I start app2 and i want the data in the textfield from app1 available in app2. (i did not write app1 its a commercial app) I guess it should p...

ASP.NET: produce an error message when a non-numeric value is entered in a textbox?

If a user enters a non-numeric value into a TextBox and presses a Button, I want to show an error message on a Label. How can I achieve this? ...

how to set tool tip for the aspxtextboxes to show their text contents ?

i have been working with devexpress AspxTextbox, in asp.net and c#.net? initially i was struggling to settext for aspx text boxes,but after that i got a tip that clientinstancename.settext() with custom js properties solve that issue. now the problem is i have to set the tool tip for the aspxtextboxes to show their text contents ? how...

how to make a textbox non selectable using c#

Im using c#.net windows form application.I have a text box. How can I make the text box unselectable. I don't want to disable the complete textbos ...

vbCrLf in Multiline TextBox shows up only when .Trim() is called

I have an ASP TextBox with TextMode set to MultiLine. I'm having problems with preserving the vbCrLf characters when a user tries to put line breaks into the text. When a button on the page is pressed, I'm taking the text from the control, trimming it using String.Trim, and assigning that value to a String property on an object (which, i...

jQuery - Change background of input field if text getting replaced

I'm currently using jQuery to restrict a text box to number only input as follows: $('input.numbersOnly').keyup(function () { this.value = this.value.replace(/[^0-9\.]/g,''); }); I'd like to let the user know that what they are typing is being rejected by changing the background color of the field. I know that I can c...

Creating a Mac OS application that interacts with all text fields

What would be the first step to creating an application for Mac OS X that would take user interaction from any text field in the system? A couple examples of apps that do this are TextExpander and Typinator. What I want to do would be using similar functions to access Text fields throughout the computer during user input to give other a...

How to change the font color in the textbox in C#?

If I want to upload a text file into the textbox and want to highlight certain words with a font color change, how can I do that without drawing the text? Thank you. ...

How to make Chrome obey this rule?

Here is the code: <table style='margin-left: auto; margin-right: auto; text-align: right;'> <tr> <td style='vertical-align: top;'>Title:</td> <td style='width: 400px;'><input type='text' style='border: 1px solid black; width: 100%;' /> </tr> <tr> <td style='vertical-align: top;'>Content:</td> <td><textarea style='border: 1px ...

How can I select multiple text segments in a WPF textbox?

Is it possible to select multiple parts of text within a WPF textbox? For instance, for a textbox that contains the string THIS IS A TEST, I want to be able to highlight THIS, then hold Ctrl and highlight TEST without unselecting THIS. For a visual clue about what I'm aiming at, see this article about the feature in Firefox. If by defa...