textbox

Automatic event firing in a textbox while text is being typed

那年仲夏 提交于 2019-12-25 07:02:56
问题 I m designing a spell checker for Indian language in asp.net using c#. I have prepared all the modules. But, there is a problem using TextBox as I want it to tell the error while user types in the text and highlight that string. I have done this on a button click but I am not able to do it directly without any button. Is it possible using jquery or ajax tools to use a TextBox for firing an event while text is being typed? (I tried TextChanged event but it gets fired only when a Button is

WPF: how to make the Screen reader to read the text from a TextBox

烂漫一生 提交于 2019-12-25 05:35:25
问题 I have to implement the UI accessibility in my WPF application, especially the screen reader Jaws. I have a textbox where the user should enter some text. How can I make Jaws to read the text that was just inserted by the user? 来源: https://stackoverflow.com/questions/13747785/wpf-how-to-make-the-screen-reader-to-read-the-text-from-a-textbox

WPF: the style of control does not work unless the control template created for style

老子叫甜甜 提交于 2019-12-25 05:22:24
问题 It almost gets me mad in recent days. I have a textbox and the style in xaml file. But the style without a control template cannot take effect on textbox. Whereas, a control template works, but control template seems to overwrite the textbox totally, the default behaviors loses of textbox such as editing, inputing or selecting... Here is content of xaml with the control template: <Style TargetType="{x:Type TextBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Border Name=

Comparing two list box and displaying the differences (VB.net)

人盡茶涼 提交于 2019-12-25 04:24:50
问题 Hello I am having troubles with my application. I am trying to load a list into listbox1 and then refresh the same list in listbox2 (but with possibly different results) and then compare the two and display in textbox1 the differences between the two list boxes. I have gotten to a point where I am able to tell if there are differences but when it goes to post into the textbox it displays the entire listbox and not the differences. That's a little wordy. Sorry. Below is my code: TextBox1.Text

one textbox one button two different pages in html

陌路散爱 提交于 2019-12-25 04:24:21
问题 i am trying to assign a textbox value to a php variable now problem is i want one button to work for two different pages i.e if i enter in a text box 'a'and click on button it should redirect to 'a.php' page if i write in a text box 'b' it should redirect to 'b.php'. so one textbox,one button two different pages. Code : <html><head> <meta charset="UTF-8" /> <script> function submitForm(action) { document.getElementById('a').action = action; document.getElementById('a').submit(); } function

Text Box inside EditTemplate in a Datagrid is returns empty text

纵然是瞬间 提交于 2019-12-25 04:19:32
问题 i want to Capture the the Text Entered by a user when the update Command is Pressed taking into Consideration that i Changed the Edit and Update Command To be named Activate <asp:DataGrid ID="Datagrid1" runat="server" AutoGenerateColumns="False" Width="100%" OnCancelCommand="Datagrid1_CancelCommand" OnEditCommand="Datagrid1_EditCommand" OnUpdateCommand="Datagrid1_UpdateCommand"> <Columns> <asp:TemplateColumn> <EditItemTemplate> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td

C#:Search from treeview

99封情书 提交于 2019-12-25 03:49:09
问题 I got a treeview data loaded from a XML file. I want to perform a search when the user types something in the textbox. Is that the right way of doing it?? I just want to filter the data. Please show me some example. The below code is not working. textBox1.Enter += new EventHandler(txtSearch_TextChanged); private void txtSearch_TextChanged(object sender, EventArgs e) { foreach (TreeNode node in this.treeView1.Nodes) { if (node.Text.ToUpper().Contains(this.textBox1.Text.ToUpper())) { treeView1

WPF Textbox TwoWay binding in datatemplate not updating the source even on LostFocus

旧街凉风 提交于 2019-12-25 03:32:30
问题 I have an ObservableCollection<string> Tags as part of a custom object. I bind it to a DataTemplate in order to show all tags to the user with the following code: <StackPanel DockPanel.Dock="Top" Margin="15,0,15,0" Orientation="Horizontal"> <Label Content="Tags:" FontSize="14" Foreground="{StaticResource HM2LightTextBrush}"/> <Grid> <ItemsControl Name="PanelPreviewNoteTags" ItemsSource="{Binding ElementName=lbNotesQuickView, Path=SelectedItem.Tags}" Margin="3,0" Visibility="Collapsed">

Get the value of a scrollbar's scroll for a Winforms Text Box (C#)

不问归期 提交于 2019-12-25 03:30:51
问题 I am creating a Windows Form Application using C# I require a checkbox to be greyed out until the user scrolls to the bottom of a text box. How can I get the value of the textbox's scrollbar position? 回答1: This should be a RichTextBox so you can use its SelectionProtected property to ensure that the user cannot change the text. It does not have a Scroll event but that can be added by overriding WndProc() and detecting the WM_VSCROLL message. Checking if the last line is visible like @TaW does

How do you make a text box readonly using JavaScript

荒凉一梦 提交于 2019-12-25 02:43:39
问题 How can i make a text box readonly when a button is clicked using JavaScript? I have tried different scripts like: document.getElementById("text").readonly="on"; but since readonly is a Boolean i don't think it works. Would i use document.getElementById or something else? Can i make all of the text-boxes in a form readonly using one script or would i need a separate script for each text-box? Could this be done using CSS? Thank you! 回答1: document.getElementById("text").readonly='readonly';