textbox

Get html tags from textbox in C#

I have a text area in my ASP.NET web application that is used to enter html code. Now there is also an button control, which upon clicking should retrieve just the text placed between certain html tags in the text box. For example: 1) User types html code including tags etc. and clicks the OK button 2) In my code the text from the te...

How can I show a textbox on my BlackBerry application?

How can I add a textbox so a user can enter numeric values into my form? I need the borders of the textbox control to be visible at all time. Thanks. ...

How to determine whether TextChanged was triggered by keyboard in C#?

I have a method private void textBoxPilot_TextChanged(object sender, TextChangedEventArgs e) { ... } where the textbox in question takes a search string from the user and populates a ListBox with the results on every keystroke. Subsequently, when an item is picked from the ListBox, I would like the choice reflected in the same Textb...

Creating a windowless, zoomable text region that proxies to a real Winforms textbox in C#

Important: we really need the stated functionality, so please don't start suggesting alternatives. We're trying to display and input text on a custom WinForms control that includes text and non-text regions - in other words, a modern canvas. We need to be able to display the text and caret on the custom control at various zoom levels a...

Different font-sizes and orientations in a TextBox in WPF(C#)

I have a text box like this <TextBox x:Name="SA1" Grid.Row="1" Grid.Column="1" TextAlignment="Center"/> I need a single/two digit number to be placed in the Top-Left corner of this textbox in a lowered font-size. And rest of the text must be styled in a bigger font-size at the center of the Textbox(both vert and hor). How can I progr...

Custom WPF DatePickerTextBox Template Help

I am trying to use a custom textbox in the DatePicker control, but I can't get the date to bind from the popup calendar to the TextBox. I don't want to have to style the entire DatePicker unless I have to, and the DatePickerTextBox has its own control, so there must be a way to only alter it. The code below is what I have as a start: <S...

WPF TextBox: error setting style

Hi, I have defined style for my textboxes that would show hints about what to enter when the textbox is empty. This would be my window: <Grid> <Grid.Resources> <Style TargetType="{x:Type TextBox}" x:Key="stlHintbox"> <Style.Triggers> <DataTrigger Binding="{Binding Text, RelativeSource={RelativeS...

efficiency in textbox control access vs working on local copy of text.

I was programming a small notepad like app with some extra functionalities. I am using a rich textbox as the main area. My question is while performing operations on the contents of the textbox, like code formatting, highlighting, etc which might require reading each character and replacing wherever necessary. Moving back across text in...

Owner draw TextBox for use in WinForms

I need a lean & mean TextBox solution. A RichTextBox proves too slow, so I want to go the way of owner drawing, or custom control building. My need is for a textbox that can handle large text content and offers simple highlighting by drawing colored backgrounds around words or single characters. Important is, that the text string itself...

How can I put a Twitter-like fade-in glow around an HTML text input field?

I know a glow around input fields is standard, but Twitter manages to fade it in smoothly. I've been looking around but can't seem to find a solid way to achieve this. How is this done? ...

Force text instead of HTML

Hi. I'm having the following problem: I have a page where a user inserts text inside a textarea and then I output the contents of that textarea in another page (php). If the user decides to insert, for example input type="text" name="_name" (can't use < and > or the text won't show, which is exactly my problem) then when showing the out...

HTML - Text Box - JS Function for Characters Left like SO

<input type='text' name='one' id='oneID' maxlength="150"> i need the JS to display the number of characters left that user can input a picture is worth a 1000 words so no more explanation required... ...

How to disable HTML tag validation on a specific TextBox?

I have a form where one of the fields would allow entry of HTML tags. <asp:TextBox ID="someID" runat="server" TextMode="MultiLine" /> In this field I have a RequiredFieldValidator validation only. Unfortunately, after any PostBack if the content of any of the fields includes HTML tags or any other potentially dangerous code - the enti...

Setting FontSize below 6 in Silverlight

Whenever I set a TextBox's FontSize dependency property to a value less than 6.0, whether in XAML or in code, an ArgumentException is thrown. Is there any way to work around this arbitrary limit? ...

I need an efficient way to process a backspace in a C# text box.

I have a GUI that has a text box that is used to display the output of a device that is connected to a serial port. There are times when that device will output a "ticker". This is a sequence of character-backspace-character that results in the appearance of an analog clock's hands turning using the characters '|', '/', '-' and '\' alo...

WPF tab-control with the same controls for all tabs

How do I create n-numbers of tabs with the data controls in wpf? Let's say the main application has a button called "new customer" and "save data." When "new customer" is pressed a new tab appears with two text boxes "Name" and "Customer Number" contained in the tab, and so on. Once the two fields are populated, pressing the "save Data"...

Why doesn't HorizontalContentAlignment work in Silverlight as it does in WPF?

In WPF, tb.HorizontalContentAlignment = HorizontalAlignment.Center works: WPF XAML: <Window x:Class="TestText2343434.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> <StackPanel x:N...

Weird situation with TextBox.Text property in WPF

This one has me stumped. I found some code posted by Ray Burns to create a DependencyProperty for a TextBox that allows you to restrict which characters can be deleted by the user. I modified it a little to instead restrict which characters can be inserted, and used that to create TextBoxes that only accept numeric input (plus the decima...

TableAdapter Update fail

Hi everyone, I have a VB windows Form project that connects to several DataTables in an Access DB. On my form I have several textboxes, comboboxes and datetimepickers that are bound to those sources. With one table in particular when I try to update the tableadapter after editing one of the textboxes the update method fails. No exceptio...

using Bindinglist as bind for Textbox

I have a bindinglist. i am using a textbox to show its items WithEvents xBind As New BindingList(Of Emp) I added items this way xBind.Add(New emp("alpha0", "B")) xBind.Add(New emp("alpha1", "B")) xBind.Add(New emp("alpha2", "B")) xBind.Add(New emp("alpha3", "B")) I am binding the first property to a textbox TextBox1.DataBindings.A...