textbox

How can I sync the scrolling of two multiline textboxes?

How can I sync the scrolling of two multiline textboxes in C# (WinForms)? When you scroll up/down a line in TextBox A, TextBox B should scroll up/down too. The same the other way around. Is this achievable without custom controls? ...

Wpf AttachedBehavior losing base textbox functionalty when using it.

I have a attached behavior issue. When I attach the behavior to my textbox I lose all my base functionality like the Max length? Here is how I am attaching it in my xaml. When I take off the attached behavior the max length work when I put it back on it doesnt work? Any help would be greatly appreciated! This is the class I am usin...

WPF TextBox Border when selected ?

Hi, I want to make a WPF TextBox have a DarkBlue border and thickness equal to 1. I want to make the WPF have this border ( DarkBlue, thickness set to 1 ) even when the TextBox is selected. I tried doing this task by the following code. However, it doesn't work at all. Any ideas or hints ? Any help would be greatly appreciated. <S...

Efficient/Easy method to validate for empty text boxes?

I have a about 6 or 7 text boxes which needs to be validated to make sure they are not empty from server side code. So how I usually do this is, check each textbox 1 by 1 to ensure that they are not empty. Are there any other efficient methods to do this? I have searched on SO and have found out that adding all the textboxes to a list an...

Unmask textbox password with Javascrip or jQuery

I have a textbox for user to enter positive integer. User enters a lot of entires many time. Overtime, textbox has list of previous entries, when you start typing something similar to previous entry. Sometimes, user accidentally select those previous entries. I know this one of browser's features. Is there anyway to clear these prev...

Format Text Going Into A Textbox for a Phone Number, etc.

Hi There, Couldn't find this anywhere, maybe I'm looking for the wrong verbs. I'm trying to get a textbox to require a certain format as you type in a number. For simplicity, lets use a phone number example. As I type into the box I want some guidelines to help the user enter the correct format of the phone number: (4__) ___-____ ...

problems updating Access database from Textbox help?

Hello everyone I have searched, but nothing happens, I just starting using C#.NET and I a have a textbox on a form. I retrieve some data from the database and I display to a textbox through a combobox that indicate the section I want to display (I already do this!),but when I try to update nothing works, I click my button to update the ...

Forms in C# .NET

I have 2 textbox's & one button on Form1 and one textbox1 on Form2 when I Click on button of Form1 I want to save with file name which contains in textbox1 of Form2 with information of textboxes in Form1 ...

GWT: creating a text widget for highly customized data entry

I'm trying to implement a kind of "guided typing" widget for data entry, in which the user's text entry is highly controlled and filtered. When the user types a particular character I need to intercept and filter it before displaying it in the widget. Imagine if you will, a Unix shell embedded as a webapp; that's the kind of thing I'm tr...

WPF - How to avoid TextBox override of Foreground of inherited TextElement.Foreground

Hey guys, TextBox.ForegroundProperty is inherited from TextElement.ForegroundProperty. Unfortunately TextBoxs DefaultStyle sets this Property again. That means that setting TextElement.Foreground on any parent container of the TextBox does not affect the TextBoxs Foreground Color. Do you know any elegant way to avoid this behavior? I ...

WPF TextBox setting Text using Trigger during validation

I am having a requirement where in I have to revert the values of a TextBox to old value when the user enters a wrong input. I am using MVVM framework so I dont want to write any codebehind. The Text and Tag of TextBox is databound from ViewModel variable. So my Tag field of TextBox will always have old value. I want to use the Tag field...

Binding multiple textbox controls to database rows.

Hi Guys. I´m trying to store some parameters for my application on a database table. The table contains multiple rows which contains a Key -> Value relationships. On my windows forms program (written in C#) I have multiple controls that should allow the user to interact with the stored configuration on the database. For example, my dat...

Textbox css with info

I want to create a textbox for the username But once he starts typing i need a small image with the requirements of username to be displayed dynamically .. can anyone help me ?? ...

Does there exist any commercial WPF control similar to the recipient TextBox in Outlook 2010 ?

Hello, our company wants a TextBox very similar to outlook recipient Textbox. Not emails but displaying people`s names delimited with a e.g. semicolon and even more crazy ideas on it... Do you know of any commercial WPF control who can handle that job? I already checked DX,Telerik,Infrapistics,Farpoint,componentone,Nevron,Syncfusion, e...

What's the best way to create a WPF TextBox that replaces spaces with underscores?

I'm creating a FilteredTextBox in WPF that subclasses the included TextBox control. The FilteredTextBox must only allow characters in the range [a-zA-Z0-9_] to be entered, and I've got that part pretty much working. I've hooked into OnPreviewTextInput to handle typed characters, OnPreviewDrop to filter characters that are dragged and d...

Google Chrome > Textboxes > Yellow border when active..?

Hey, Ive been modifying a form today, and testing it in Chrome. I noticed that on selecting a textbox, with border: 0 or none, it still puts a yellow border around it. Does anyone know of a way to get rid of this border? I usually wouldnt be that bothered but it looks really horrible with the colour scheme I am using. Thanks in advance...

WPF Textbox loses original values, even if the user doesn't udpate

Hi, I am having a very strange issue. I have a datagrid which is binding to an observable collection of type Person The selected item is bind to an Object Person. I have 2 textboxes firstname and lastname. When ever user selects an item from grid, the textbox values gets populated. user can edit the values and click submit button, val...

[WPF] Retrieve the End position of the Caret in the TextBox to put the Caret in the next TextBox

How do I find the end position of the Caret in a WPF textbox so I can`t move right anymore with the caret? ...

How to check to see if a textbox is currently active or has focus?

Hi! In C#, is it possible to get a bool value, determining if the cursor is currently inside a certain textbox? What I want to achieve: I have a masterpage, with two buttons in it; a search-button and a login-button. Depending on what textbox is active or has focus, or of none have focus, I want to set the UseSubmitBehavior-attribute....

WPF Databinding TextBox to integer property in another object

I have what I think is a very simple databinding question (I'm still new to WPF). I have a class (simplified for this question) public class ConfigurationData { public int BaudRate { get; set; } } In MainWindow.Xaml.cs I have a private member variable: private ConfigurationData m_data; and a method void DoStuff() { // do...