selection

UICollectionView shouldSelectItemAtIndexPath=NO does not avoid deselecting old selection?

≯℡__Kan透↙ 提交于 2019-12-04 22:16:55
I have multiple items in a CollectionView, but only a few of them should be selectable. I'm handling this with the delegate method: - (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath My problem occurs if a selectable item is selected and in the next step the selection of a not selectable item is rejected by shouldSelectItemAtIndexPath returning NO, the selected item gets deselected anyway. I have also tried to use - (BOOL)collectionView:(UICollectionView *)collectionView shouldHighlightItemAtIndexPath:(NSIndexPath *)indexPath But it's

How to set the SystemColors.HighlightBrushKey in WPF with a Converter

Deadly 提交于 2019-12-04 20:53:07
I im trying to set the SystemColors.HighlightBrushKey always a bit darker than the Background of the selected Row. Therefore im using this Code: App.xaml: <WPFTests2:SelectionBackgroundConverter x:Key="SelectionBackgroundConverter"/> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="{Binding Background, Converter={StaticResource SelectionBackgroundConverter}}"/> </Application.Resources> Window1.xaml: <Window x:Class="WPFTests2.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1"

Getting selected item in active window

删除回忆录丶 提交于 2019-12-04 19:37:56
I am using C# to develop an application that works with the clipboard, an was wondering if its possible to get the contents of what the user has selected in the current window, no matter what window it is (e.g. could be FireFox, notepad, etc.). I'm not sure if you're going to be able to get a general solution for this problem. Take a look at this link; http://www.eggheadcafe.com/software/aspnet/33899121/get-selected-text-of-active-window-.aspx The author of this post reports that their solution works in Notepad, but not in Wordpad or Word. I don't know much about this area, but I would guess

DataGridView row: Semi-transparent selection or row border on selection

北战南征 提交于 2019-12-04 19:23:00
问题 I have a DataGridView where the background of each row is different depending on the data bound item. Though, when I select a row, I can no longer see its original background color. To solve this, I have thought of two solutions: I can make the selections semi-transparent, making it possible to see if two selected rows have different background colors. Or; I can remove the selection colors entirely, and draw a border around the selected rows. What option is easier and how can I do this? It's

WPF DataGrid full row selection

家住魔仙堡 提交于 2019-12-04 18:35:27
问题 I'm using WPF and .NET 4.0. Recently in one of my programs I switched from using ListView with GridView to DataGrid. I want to be able to select and highlight the whole row like I was able to do in ListView. In ListView, when I click on the empty space right from the last column, I'm still able to select the row. The whole row is highlighted, not only the cells. In DataGrid however, after setting SelectionMode="Single" and SelectionUnit="FullRow", the row is selectable only when I click on

Is there are any implementation of rectangle selection in javafx?

a 夏天 提交于 2019-12-04 18:02:56
I mean like in file managers, when you would click, drag the mouse, creating a rectangle selection and after the mouse released selection is created? I could do that like this (pseude-code like): onMousePressed: setGestureStarted(true) onMouseMoved: if isGestureStarted: changeRectangle(event.getX, event.getY) onMouseReleased: select(getSelectionRectange()) But I thought that it's pretty common behavior and maybe it's already in framework. EDIT1: I was trying to do zoomable linechart. And I actually came across library to do that. It's pretty good, but could be better though. Right now I'm

How do I get the path to the currently selected file

心已入冬 提交于 2019-12-04 17:35:44
Does VBScript have a function to get the path to the currently selected file in File Explorer? If so, what is the function? I'm looking for something like Set fileObj = CreateObject("Scripting.FileSystemObject") dim filepath filepath = fileObj.GetCurrentSelection() 'doesn´t exist dim result result = filepath 'communicate with LiveCode I wrote a simple example. Keep in mind there may be more than one open windows explorer window and this will list them all. Function GetSelectedFiles() 'Returns paths as array of strings Dim FileList, Window, SelectedItem 'avoid duplicates by storing paths in

Select and highlight text in Android WebView

筅森魡賤 提交于 2019-12-04 17:26:45
I'm developing app for Android smartphones >= 2.1 with WebView. Webview contains page with text data. I want to let a user select a text in WebView and then highlight it. I realized selection, via emulateShiftHeld() , but it stupid copies selected text into Clipboard. Can I set JS callback for selection finished event inside page html? Or, may be, in Java set a WebView's listener for the same? Thank you user1659559 I am using a github project called BTAndroidWebViewSelection to get web view selections working in 2.2 - 4.0.3. This project uses a javascript interface that gets all touches passed

Firefox select dropdown keeps refreshing/reverting to default option due to running Javascript - AngularJS

你说的曾经没有我的故事 提交于 2019-12-04 16:04:08
问题 I'm building an app in AngularJS and am having trouble with select dropdown menus when using Firefox. When I click a select menu and hover over the options, it resets the selected option, from the one my cursor is hovering over, to the default/first option. When the number of options is large, it becomes very difficult to select the correct option. The app requires JavaScript to update the screen every second, and this seems to be the cause. However, I don't seem to have this problem with

Is it possible to select css generated content? [duplicate]

帅比萌擦擦* 提交于 2019-12-04 15:08:11
问题 This question already has answers here : How can I make generated content selectable? (2 answers) Closed 4 years ago . Let's say I have mark up: <div data-generated="world!">Hello </div> ..with CSS: div:after { content: attr(data-generated); } This produces the text: Hello world! - FIDDLE div:after { content: attr(data-generated); } <div data-generated="world!">Hello </div> BUT... If I try to select / Copy the text - only the 'hello ' part is selectable. Is there any way to select css