Questions tagged [selectedtext]
93 questions
4
votes
7 answers
PHP code to get selected text of a combo box
I have a combo box named "Make". In that combo box I'm loading vehicle manufacturer names. When I click SEARCH button I want to display the selected manufacturer name. Below is part of my HTML code.

Emmanuel Yasith
- 53
- 1
- 2
- 4
4
votes
1 answer
MVC3: Get Drop down menu selected value/text via Javascript
On MVC3, with a dropdownlist defined as
@Html.dropDownList(m=>m.model, new SelectList(m.myList, "value", "text"))
How can I get the selected value and/or text via javascript?
I tried passing a name:
@Html.dropDownList(m=>m.model, new…

jpo
- 3,959
- 20
- 59
- 102
3
votes
1 answer
Changing vim selected text colors
I would like to add a color scheme rule in vim in which I could apply black over white in a text everytime it's selected in visual mode.
Any ideas ? Thank you.

Niloct
- 9,491
- 3
- 44
- 57
2
votes
3 answers
UITextField SigAbrts on selectedTextRange
I'm trying to find and delete the selected text in a text field, but it SIGABRTs every time. I keep getting an NSInvalidArgumentException when I try to retrieve the selectedTextRange. In fact I tested it and every function having to do with the…

Heckman
- 398
- 1
- 13
2
votes
0 answers
How Can I create a item in the text selected menu in Android?
I am developing an App with kotlin and Jetpack Compose and I want to add an item to this menu: image menu 1
when I select a text, I would like to show in this menu an option from my app, is this possible?
thanks!

agmcoder
- 195
- 1
- 8
2
votes
1 answer
Color change of selected text not working
Hey Guys im currently stuck in writing a Debug function where my Exception should gets printed in Red to an RichTextBox.
I tried different solutions i've found here but they are not working, so i think i'm doing something wrong.
Here is my Function…

Paddy
- 31
- 4
2
votes
3 answers
how to get selected text, but can I get surrounding context in javascript?
I am able to grab the text that a user has selected on a web page,
using this code:
function getSelected() {
var userSelection;
if (window.getSelection) {
selection = window.getSelection();
} else if (document.selection) {
…

user495688
- 973
- 2
- 15
- 25
2
votes
3 answers
How to select a text in a textView having a NSRange in Swift?
I have a UITextView where I would like to select a part of the text. I'm trying to use selectedTextRange, unfortunately I get this error:
Cannot convert value of type 'NSRange' (aka '_NSRange') to expected
argument type 'UITextRange'
This is the…

Cue
- 2,952
- 3
- 33
- 54
2
votes
1 answer
combobox automatically selecting a value
I using a System.Windows.Forms.ComboBox and I'm getting some weird unexpected behavior. In c#, I am dynically adding a few comboBoxes to my form and binding them to a list. The only fields I'm setting are DataSource,ValueMember, and DisplayMember.…

Mike Turner
- 471
- 1
- 7
- 22
2
votes
2 answers
Javascript: How to find which instance of a particular text (e.g. a word which occurs more than once in a paragraph) was selected in a long paragraph?
I plan to develop a web application. In a part of the application, the user selects a text from a paragraph, and then click a save button.
For example, the user selects "apple" (shown in bold) from the following text:
An apple is the pomaceous…

Solace
- 8,612
- 22
- 95
- 183
2
votes
3 answers
Select the Initial Text in a Silverlight TextBox
I am trying to figure out the best way to select all the text in a TextBox the first time the control is loaded. I am using the MVVM pattern, so I am using two-way binding for the Text property of the TextBox to a string on my ViewModel. I am using…

Dan Auclair
- 3,607
- 25
- 32
2
votes
2 answers
Get position of selected text in string in textbox
Ok, I'm trying to do something a little specific here. I want to get the location of the selected text in a textbox.
To elaborate- I can use location to select text. If I have a textBox1 I could do:
textBox1.SelectionStart =…

user1548103
- 869
- 2
- 12
- 25
2
votes
2 answers
WPF RichTextBox - Replace Selected Text with Custom Control
Before I start hacking in a really crude solution, I thought I'd see if someone could give me a little nudge in the right direction.
What I really want to do is let a user select some text in a RichTextBox, click a button, and convert that text into…
Ben
1
vote
2 answers
ContentEditable Replace String using JS
I have a ContentEditable Section. I want to get what the user selects, and then replace it with a new string.
So I will want the start and end of selected string, remove the old string, put the new string in place (will be longer).
Example:
Typed…

Arjun Bajaj
- 1,932
- 7
- 24
- 41
1
vote
2 answers
Append something to selected text with jquery
I'm trying to append an tag in to selected text when user right click on it.i searched over the stack , no matches found.

bizzr3
- 1,925
- 4
- 24
- 37