textselection

TEdit onclick select all?

故事扮演 提交于 2019-12-07 16:44:39
问题 How to select all text of a TEdit1 whenever user click on it or click to select some text of it 回答1: How to select all text of a TEdit1 whenever user click on it Select Edit1 in the VCL editor and double-click on the OnClick event: procedure TForm13.Edit1Click(Sender: TObject); begin Edit1.SelectAll; end; You can also link this event to another control like a button. Select the button, choose and click on the V arrow to select an event you want to link. Now both Edit1.OnClick and Button1

Get selected text on IPad 2 with Javascript

可紊 提交于 2019-12-06 10:52:50
I'am developing a web-application that allows to select parts of an html document and put some kind of annotation on it. To get hold of the selected text I use window.getSelection() which works pretty fine in IE9, FF, and Safari. However I run into trouble when using the same page on my IPad 2: If I just select a word by tapping it for a sec, window.getSelection() returns the proper selection. If I create a text range ( as discribed here http://blog.laptopmag.com/how-to-select-copy-and-paste-text-on-the-ipad ) always return "null". I've already examined the window, document and related event

How can I programmatically clear text selection in InDesign with ExtendScript?

谁都会走 提交于 2019-12-06 08:17:22
问题 I've programmatically selected some text in InDesign using ExtendScript: app.findGrepPreferences = NothingEnum.nothing; app.findGrepPreferences.appliedFont = myFont; var matches = app.activeDocument.findGrep(); if(matches.length > 0) { matches[0].select(); } How can I deselect it now? Is there no function for this, like app.clearSelections(); or something of the sort? 回答1: Try with: app.activeDocument.select(NothingEnum.NOTHING); 来源: https://stackoverflow.com/questions/10743073/how-can-i

Is it possible to create a custom floating text selection menu in Android versions pre Marshmallow?

旧时模样 提交于 2019-12-06 06:04:01
问题 I'm looking to create a custom menu for text selection. I know it's possible to edit the behaviour of the action bar with setCustomSelectionActionModeCallback, but in my case I don't want that action bar to show at all, I want my own floating custom menu which I have already achieved. Only thing is that there is no way to not show the action bar menu after selecting the text in the TextView. The behaviour I need is not the standard cut/copy/paste, the actions I have implemented are for

Disable text selection and copy paste in hybrid app using JS

余生长醉 提交于 2019-12-06 02:18:10
问题 I am trying to disable text selection and copy paste in phonegap applicaion by using following code. CSS -webkit-user-select:none; JavaScript $('body').on('cut copy paste',function(e){e.preventDefault();}); It works on all OS platforms including adroid 4.4+ but having issues on 4.1 and 4.2. Please Help. Both doesn't support android 4.1.2 and 4.2.1. [Tested on Micromax canvas 4 and samsung galaxy s2] 回答1: you can use css to do that * { -webkit-user-select: none; -khtml-user-select: none; -moz

NSTextField (Label) Attributed Text: Select

时光怂恿深爱的人放手 提交于 2019-12-06 02:10:43
问题 I have a NSTextField Label that has attributed text in it. The color and size are different from the defaults. (The text is a bit larger and green) Now, I need to be able to select the text in the label so as the click the hyperlinks embedded in the attributed text. This works fine; however, when selecting the text the format of the text reverts back to the defaults (a smaller, black font). Is there anyway to stop this behavior so that my styling is preserved when the user clicks (selects

TEdit onclick select all?

≡放荡痞女 提交于 2019-12-05 22:07:31
How to select all text of a TEdit1 whenever user click on it or click to select some text of it How to select all text of a TEdit1 whenever user click on it Select Edit1 in the VCL editor and double-click on the OnClick event: procedure TForm13.Edit1Click(Sender: TObject); begin Edit1.SelectAll; end; You can also link this event to another control like a button. Select the button, choose and click on the V arrow to select an event you want to link. Now both Edit1.OnClick and Button1.OnClick link to the same event. It can be quite dangerous to do anything beyond the default behaviour of the

Disabling text selection in DocumentViewer

不羁的心 提交于 2019-12-05 10:44:41
Simple question. How do you disable the text selection of DocumentViewer in WPF? This is the feature where an XPS document is displayed by the viewer and then text can be highlighted via mouse. The highlighted text can also be copied but I have already disabled this. I just don't know how to disable the highlighting. Thanks! We have solved this by overriding the ControlTemplate of the ScrollViewer embedded in the DocumentViewer control. Insert the Style below in "Window.Resources": <Style TargetType="{x:Type ScrollViewer}" x:Key="CustomScrollPresenter"> <Setter Property="Template"> <Setter

Handling text selection event in Firefox extension (preventing user from selecting text)

跟風遠走 提交于 2019-12-04 18:57:42
I was wondering if in chrome code we have some better way to detect when the user selects/highlights something in the current page than listening for keyup / mouseup and checking window.getSelection() . Any ideas? edit: Actually, what I'm trying to do is simply preventing the user from selecting any text at all in the contentDocument. Something that accomplishes this will be fine as well. (The idea behind getting the selection event was just to preventDefault() or otherwise getSelection().removeAllRanges() ) edit2: Please note that I need not just to prevent the highlighting from showing up,

What Text Selection Control is this?

早过忘川 提交于 2019-12-04 10:38:58
问题 I want to implement the same nature type of control on text selection on a Activity with various text fields. Any ideas of implementing the behavior shown in Picture 回答1: Refer this from the Android 2.3 Documentation: You can create your own Text Selection Control using this methods. 来源: https://stackoverflow.com/questions/4874266/what-text-selection-control-is-this