selection

UITableViewCell setSelected, but selection not shown

I want to keep a cell selected, and only change when I select another cell. In tableView:cellForRowAtIndexPath: I have set a selected cell with [cell setSelected:YES]. I know the cell is selected, but it is not shown. When I call [tableView reloadData] the selected cell flashes. Any ideas? ...

How do I find out the DOM node when select text in a browser’s editable content window using Javascript?

I want to get parentElement when I select some text in iframe. iframe = document.getElementById("iframe"); function getParentElement(){ var sel=iframe.contentDocument.getselection(); return sel.parentElement() } getParentElement(); when I run this code it show Error:" TypeError: iframe.contentDocument.getSelection().parentElement i...

Selecting a UserControl from XAML

I'm working on a problem right now where I need to embed a UserControl inside another UserControl. But, I need to determine at runtime which embedded UserControl to instantiate. This implies to me that some form of data binding and/or template selection mechanism has to be invoked, but I'm not sure how to proceed with the pure XAML appr...

Change background selection color of ListView?

Hello. How can I change the selection color on a ListView? By default, when the user selects an item it shows a blue background. I want to change this to dark gray, or something... Thanks for the help! ...

binding a WPF ListBox SelectedItem to a list

I have a listbox that has its SelectionMode property set to Multiple. Is it possible to bind the SelectedItem property to a List? and not to a single item? Thanks ...

How can I show a "selection highlighting"-rectangle around a column of a Silverlight Grid?

I have a feature matrix implemented with Silverlight's Grid where users need to select a product. How can I indicate selection with a rectangle around the whole selected column? It is easy to put a CheckBox at the bottom of each product's column, but that is too dull. I would have preffered to use SL Toolkit's DataGrid (with built-in ...

How to change the blue highlight color of a UITableViewCell?

hi, I'm wondering how to change the blue highlight/selection color of a UITableViewCell, any ideas? Thomas ...

Browser Dom Selection in C# Windows Forms App

I'd like to build a windows forms app to allow users to make selections within the Browser object. I'd like to capture their selection (by index or DOM element - no too picky at this point) and use this information to query content from the page. How can I capture the DOM selection from my C# app code? ...

R: Select subset of dataframe by non-unique ids

Suppose I have a dataframe like this one: df <- data.frame (id = c("a", "b", "a", "c", "e", "d", "e"), n=1:7) and a vector with ids like this one: v <- c("a", "b") How can I select the rows of the dataframe that match the ids in v? I can't use the id column for rownames because they are not unique. When I try that, I get: rowname...

Select Top N Records Ordered by X, But Have Results in Reverse Order

I'm trying to get the top N records (when ordered by some column X), but have the result set in reverse order. The following statement is incorrect, but probably demonstrates what I'm after: SELECT * FROM (SELECT TOP 10 * FROM FooTable ORDER BY X DESC) ORDER BY X ASC For example, column X could be an ID or a timestamp; I want the late...

Which Database to choose?

I have the following criteria Database should be protected with a username and password. It should not be possible to copy the database file and use it else were like MS Access. There will be no central database server. Each machine will run their own database server locally and user will initiate synchronization. Concept is inspired f...

WPF MVVM Picklist Example

Hi, I am looking for a way of easily maintaining a list of Users belonging to a particular Group. I have thought about using a Picklist, where I have 2 listboxs, the first contains a list of Users the second a list of Users belonging to the Group. There will be buttons to allow the adding and removing of selected Users from the Group. As...

GUI Design - Roleselection with two lists, selected roles on the right, or left list?

Hi, image two lists for selecting roles for a new user creation in an administrator frontend. One list has all available roles in it and another has the selected roles in it. Between those lists are buttons to move elements from one list to another. Thus the layout is horizontal with [List] [Buttons] [List]. Now to the question: Should...

WPF ListView Cannot Trigger Selection Changed when only one row

I have a listview which has its datasource changed after update of a search textbox. When I enter search criteria that only returns one row, I am unable to trigger the OnSelectionChanged event The listbox works as expected at any other time. I have tried changing SelectedItem and SelectedIndex in Code, Clicking aimlessly on the ListVie...

Excel VSTO set selection

How do I set the selection in the active worksheet to a specific Range, using C# and VSTO 2008? ...

jQuery selective hover

Hello everyone, I'm trying to do a simple task with jQuery: I have a list of words which, when hovered, should fadeIn its corresponding image. For example: <a href="#" class="yellow">Yellow</a> <a href="#" class="blue">Blue</a> <a href="#" class="green">Green</a> <img src="yellow.jpg" class="yellow"> <img src="blue.jpg" class="blue"> ...

Android Spinner selection

The OnItemSelectedListener event handler gets called both when a spinner selection is changed programmatically, and when a user physically clicks the spinner control. Is is possible to determine if an event was triggered by a user selection somehow? Or is there another way to handle spinner user selections? ...

Bind enabled of NSButton to selection in NSTextView

I have a button that does something to the selected text in NSTextView. If nothing is selected then nothing happens when the button is pressed... so can the enabled property of a button be bound to whether or not some text is selected? ...

Java: Selected rows's index does not changes when I sort them!

Hello, I have a Jtable on which I called the method table1.setAutoCreateRowSorter(true);. So this works on well. But I also have a methos in my JFrame class which is fired when i push a button. It gets the selected rows indexes using this code int selectedRows[] = this.table1.getSelectedRows();. And displays an edit window for the fi...

NSSavePanel selecting part of file name

How do I set the part of the file name that is selected in NSSavePanel? I only want the file name selected and not the file extension. Here's what I noticed. If I setAllowedFileTypes: for the save panel then only the file name is selected but not the file extension. However if I don't set the allowed file types then the file extension i...