Search Results

Search found 215 results on 9 pages for 'selectable'.

Page 2/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • WPF - Extend ListView with checkable AND selectable ListViewItems

    - by Marks
    Hi there. I already read many examples on extending ListViews with checkboxes bound with IsSelected. But I want something more. I want a seperation between the checked and selected state, so i get a ListBox that has a single selected item, but can have multiple checked items. Unfortunately ListViewItem does not have a property for checked and I dont see a possibility to get the ListView to work with a custom CheckableListViewItem. Of course i could use a List of objects with a checked property as ItemSource, but I dont think thats a good way to go. Checked or not is a matter of the list or item-container, not of the object listed in it. Beside that I dont want all my classes like user, role, group to have counterparts like checkableUser, checkableRole and checkableGroup. The behaviour i want can be easyly accomblished for the UI with a <DataTemplate x:Key="CheckBoxCell"> <StackPanel Orientation="Horizontal"> <CheckBox /> </StackPanel> </DataTemplate> and a <GridViewColumn CellTemplate="{StaticResource CheckBoxCell}" Width="30"/> But without a binding on the checkbox i cant check if it is checked or not. Is there any way to accomplish something like that? The perfect solution for me would be to have listView1.SelectedItem, listView1.CheckedItems and maybe a listView1.UncheckedItems and of course listView1.CheckItem and listView1.UncheckItem. Thanks for any help.

    Read the article

  • Selectable GridView Row

    - by Hany
    I have a GridView on my ASP.NET page. What I want is to execute a function when I click on the row, and I also want to change the style of this row. I don't want to use the select button of type command field. Any help please?

    Read the article

  • List View Selected Index Changed in a multi-selectable list view

    - by Anton Indrawan
    I have a windows form with a listview control. I set the MultiSelect property to true and I added a selected_index changed event. I get the event fired when I click the same index as the current selected index. My expectation is that I will not get the event fired. The strange thing is that the event fired 1 second after I click the index. I appreciate for any reply to explain why this is happening.

    Read the article

  • How to make DataGrid Row really fully selectable (clicking on non-cell area)

    - by Samuel
    The question might be a little misleading. Here is a screenshot of a DataGrid that has some dummy values (code provided below) Is there a way to make the white area not covered by a cell clickable? My intention: I want to have full row selection. This can be achieved by SelectionUnit="FullRow" which is fine but how can I make the white area implicitly select the entire row without expanding available cells in width and avoiding code behind Here is the repro code: Xaml: <Window x:Class="DGVRowSelectTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" DataContext="{Binding RelativeSource={RelativeSource Self}}"> <DataGrid ItemsSource="{Binding Names}" SelectionMode="Single" SelectionUnit="FullRow" > </DataGrid> </Window> Dummy Code behind of it (just sets the two entries up) using System.Collections.Generic; using System.Windows; namespace DGVRowSelectTest { public partial class MainWindow : Window { private IList<KeyValuePair<string, string>> _names = new List<KeyValuePair<string, string>>{new KeyValuePair<string, string>("A1", "A2"),new KeyValuePair<string, string>("B1","B2")}; public IList<KeyValuePair<string, string>> Names{get { return _names; }set { _names = value; }} public MainWindow() { InitializeComponent(); } } }

    Read the article

  • How do i make a picturebox selectable?

    - by acidzombie24
    I am making a very basic map editor. I'm halfway through it and one problem i hit is how to delete an object. I would like to press delete but there appears to be no keydown event for pictureboxes and it will seem like i will have it only on my listbox. What is the best solution for deleting an object in my editor?

    Read the article

  • make selectable area using javascript

    - by Mher
    lets say I have a html page. <html> <body> ... This is my HTML Page, full of html objects and mouse events on them ... <div id='blocker' style="height: 100%; position: absolute; width: 100%; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1001; background: none repeat scroll 0% 0% black; opacity: 0.5;"></div> <div id='window_to_my_html_page' style="display: block; left: 50px; top: 50px; width: 200px; height: 200px; z-index: 1002; position: absolute;"></div> </body> </html> In this example div which id is 'blocker' will block all mouse events from my page. All my HTML page elements behind of my second div(which id is 'window_to_my_html_page') must be active, all mouse events must work on them, this div must be like a window to my HTML page I want to make all elements from my HTML page active(to work as normal) inside this area (left: 50px; top: 50px; width: 200px; height: 200px).... and other content, outside of this area make inactive The question: how can I do it?

    Read the article

  • Shows how to make your GridViews row-selectable and how to bind to a row's detail.

    How to make an ASP.NET GridView row-selectable and how to bind selected row detail to other controls. The key "trick" to learn is to be able to add an onclick javascript event to each row in the grid that will fire the intrinsic ASP.NET __doPostBack() method.  read moreBy Peter BrombergDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How do I retrieve row ID from an MVCContrib HTML Grid?

    - by ryandreggs
    Hi, I currently have a product view page that contains an MVCContrib HTML Grid with a select link at the beginning of each row. If the select link is clicked, it takes me to a different page. My question is whether it is possible to retrieve the productID from the row that is selected and pass that to the next page. Maybe this is posible to do with a session variable but im not sure. Any help would be greatly appreciated. Thanks in advance. Here is my view code: <% Html.Grid((List<System2__MVC2.Controllers.ProductController.ProductsSet>)ViewData["Products"]).Columns(column => { column.For(c => Html.ActionLink("Select", "Products", "Product")).DoNotEncode(); column.For(c => c.ProductID); column.For(c => c.Name); column.For(c => c.Description); column.For(c => c.Price); }).Render(); %>

    Read the article

  • MooTools Event Delegation using HTML5 data attributes.

    - by Anurag
    Is it possible to have event delegation using the HTML5 data attributes in MooTools? The HTML structure I have is: ?<div id="parent"> <div>not selectable</div> <div data-selectable="true">selectable</div> <div>not selectable either.</div> <div data-selectable="true">also selectable</div> </div>???????????????????????????????????????????????????????????????????????? And I want to setup <div id="parent"> to listen to all clicks only on child elements that have the data-selected attribute. Please let me know if I'm doing something wrong: The events are being setup as: $("parent").addEvent("click:relay([data-selectable])", function(event, el) { alert(this.get('text')); }); but the click callback is fired on clicking all div's, not just the ones with a data-selectable attribute defined. You can see this example on http://jsfiddle.net/NUGD4/ A workaround is to adding this as a CSS class, which works with delegation but I would prefer to be able to use data-attributes as it's used throughout the application.

    Read the article

  • jQuery Selectable only select 1 and get a value?

    - by jphenow
    This might seem like an odd request but I'd like to use jQuery's Selectable tool to only select one item at a time and I'd like it to show me a value I'll have within each tag. At the very least I want the contents of that selection. Has anyone tried to do this? For some reason these little things seem to not be all that easily findable in their API for it.

    Read the article

  • newbie in Jquery (including but no result)

    - by Negin
    I have this code: <html> <head> </head> <body> <form method='post'> <link type="text/css" href="css/themename/jquery-ui-1.8.14.custom.css" rel="Stylesheet" /> <script type="text/javascript" src="js/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script> <style> #feedback { font-size: 1.4em; } #selectable .ui-selecting { background: #FECA40; } #selectable .ui-selected { background: #F39814; color: white; } #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; } </style> <script> $(function() { $( "#selectable" ).selectable(); }); </script> <div class="demo"> <ol id="selectable"> <li class="ui-widget-content">Item 1</li> <li class="ui-widget-content">Item 2</li> <li class="ui-widget-content">Item 3</li> </ol> </div><!-- End demo --> <div class="demo-description" style="display: none; "> <p>Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections. </p> </div><!-- End demo-description --> </form> </body> </html> I downloaded the jquery but it has no result I used this site: http://jqueryui.com/demos/selectable/#event-create what is wrong here?

    Read the article

  • CSS: How to make a Div of text underneath another Div selectable?

    - by jesse
    Hi, I have a few empty Divs on a page that are basically empty boxes to help me position some stuff to make a "liquid" website. Now I've got content underneath these Divs but I can't highlight/click on the links because these empty Divs are blocking it. I've got a reason I need to have the empty Divs to be on the top layer so I need a way to "click through" these Divs. What can I do? Thanks.

    Read the article

  • How can I enable child inputs text selection in Mozilla Firefox using CSS?

    - by L. Shaydariv
    Hi. Let consider the following scenario. I have the following page where all rendered elements must be non-selectable. <html> <head> <style type="text/css"> body { -webkit-user-select: none; -moz-user-select: none; } div { border: solid 1px green; padding: 5px; } </style> </head> <body> <div> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat </div> <div> <input type="text" value="You can select the text from me" /> <textarea> And me too. </textarea> </div> </body> </html> The input and textarea text is still selectable in Google Chrome, but the text is not selectable in Firefox. I've already tried the following: input, textarea { -moz-user-select: text !important; } And... It simply doesn't work because (as far as I can see) input and textarea are nested in the document body element that's already is not selectable. So, is it possible to enable text selection of the nested user input elements in Firefox using CSS? Thank you for suggestions.

    Read the article

  • Flex/Flash: Don't show 'bar' cursor when dragging over a TextField/TextArea?

    - by David Wolever
    As the title suggests, how can I prevent the "bar" cursor from appearing when I click-and-drag over a TextField? For example, consider this interaction: I'd like to prevent the cursor changing to the "bar" in step "2". How can I do that? I've tried fiddling with the selectable flag: protected static function fixMouseOverAfordance(field:TextField):void { var iOwnClick:Boolean = false; function handleMouseOver(event:MouseEvent):void { if (event.buttonDown) { field.selectable = iOwnClick; } else { field.selectable = true; iOwnClick = false; } } field.addEventListener(MouseEvent.MOUSE_OVER, handleMouseOver, false, EventPriority.CURSOR_MANAGEMENT+1); field.addEventListener(MouseEvent.ROLL_OVER, handleMouseOver, false, EventPriority.CURSOR_MANAGEMENT+1); field.addEventListener(MouseEvent.MOUSE_MOVE, handleMouseOver, false, EventPriority.CURSOR_MANAGEMENT+1); field.addEventListener(MouseEvent.MOUSE_DOWN, function(event:MouseEvent):void { iOwnClick = true; field.selectable = true; }); } But the "bar" cursor still appears the first time the mouse is moved over the text field (however, after it has been moved out then moved back in, it does the right thing).

    Read the article

  • simplejson double escapes data causing invalid JSON string

    - by mike_hornbeck
    I have a simple form for managing manufacturers in my shop. After posting form, ajax call returns json with updated data to the form. Problem is, that the returned string is invalid. It looks like it was double-escaped. Strangely similar approach across the whole shop works without any problems. I'm also using jquery 1.6 as javascript framework. Model contains of 3 fields : char for name, text for description and image field for manufacturer logo. The function : def update_data(request, manufacturer_id): """Updates data of manufacturer with given manufacturer id. """ manufacturer = Manufacturer.objects.get(pk=manufacturer_id) form = ManufacturerDataForm(request.FILES, request.POST, instance=manufacturer) if form.is_valid(): form.save() msg = _(u"Manufacturer data has been saved.") html = [ ["#data", manufacturer_data_inline(request, manufacturer_id, form)], ["#selectable-factories-inline", selectable_manufacturers_inline(request, manufacturer_id)], ] result = simplejson.dumps({ "html": html }, cls=LazyEncoder) return HttpResponse(result) The error in console : error with invalid JSON : uncaught exception: Invalid JSON: {"html": [["#data", "\n<h2>Dane</h2>\n<div class="\&quot;manufacturer-image\&quot;">\n \n</div>\n<form action="\&quot;/manage/update-manufacturer-data/1\&quot;" method="\&quot;post\&quot;">\n \n <div class="\&quot;field\&quot;">\n <div class="\&quot;label\&quot;">\n <label for="\&quot;id_name\&quot;">Nazwa</label>:\n </div>\n \n \n <div class="\&quot;error\&quot;">\n <input id="\&quot;id_name\&quot;" name="\&quot;name\&quot;" maxlength="\&quot;50\&quot;" type="\&quot;text\&quot;">\n <ul class="\&quot;errorlist\&quot;"><li>Pole wymagane</li></ul>\n </div>\n \n </div>\n\n <div class="\&quot;field\&quot;">\n <div class="\&quot;label\&quot;">\n <label for="\&quot;id_image\&quot;">Zdjecie</label>:\n </div>\n \n \n <div>\n <input name="\&quot;image\&quot;" id="\&quot;id_image\&quot;" type="\&quot;file\&quot;">\n </div>\n \n </div>\n\n <div class="\&quot;field\&quot;">\n <div class="\&quot;label\&quot;">\n <label for="\&quot;id_description\&quot;">Opis</label>:\n </div>\n \n \n <div>\n <textarea id="\&quot;id_description\&quot;" rows="\&quot;10\&quot;" cols="\&quot;40\&quot;" name="\&quot;description\&quot;"></textarea>\n </div>\n \n </div>\n \n <div class="\&quot;buttons\&quot;">\n <input class="\&quot;ajax-save-button" button\"="" type="\&quot;submit\&quot;">\n </div>\n</form>"], ["#selectable-factories-inline", "\n <div>\n <a class="\&quot;selectable" selected\"\n="" href="%5C%22/manage/manufacturer/1%5C%22">\n L1\n </a>\n </div>\n\n <div>\n <a class="\&quot;selectable" \"\n="" href="%5C%22/manage/manufacturer/4%5C%22">\n KR3W\n </a>\n </div>\n\n <div>\n <a class="\&quot;selectable" \"\n="" href="%5C%22/manage/manufacturer/3%5C%22">\n L1TA\n </a>\n </div>\n\n"]]} Any ideas ?

    Read the article

  • Selection Highlight in NSCollectionView

    - by Hooligancat
    On some occasions my head just hurts from banging it against the Cocoa wall. Today is one of those days. I have a working NSCollectionView with one minor, but critical, exception. Getting and highlighting the selected item within the collection. I've had all this working prior to Snow Leopard, but something appears to have changed and I can't quite place my finger on it, so I took my NSCollectionView right back to a basic test and followed Apple's documentation for creating an NSCollectionView here: http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/CollectionViews/Introduction/Introduction.html The collection view works fine following the quick start guide. However, this guide doesn't discuss selection other than "There are such features as incorporating image views, setting objects as selectable or not selectable and changing colors if they are selected". Using this as an example I went to the next step of binding the Array Controller to the NSCollectionView with the controller key selectionIndexes, thinking that this would bind any selection I make between the NSCollectionView and the array controller and thus firing off a KVO notification. I also set the NSCollectionView to be selectable in IB. There appears to be no selection delegate for NSCollectionView and unlike most Cocoa UI views, there appears to be no default selected highlight. So my problem really comes down to a related issue, but two distinct questions. How do I capture a selection of an item? How do I show a highlight of an item? NSCollectionView's programming guides seem to be few and far between and most searches via Google appear to pull up pre-Snow Leopard implementations, or use the view in a separate XIB file. For the latter (separate XIB file for the view), I don't see why this should be a pre-requisite otherwise I would have suspected that Apple would not have included the view in the same bundle as the collection view item. I know this is going to be a "can't see the wood for the trees" issue - so I'm prepared for the "doh!" moment. As usual, any and all help much appreciated.

    Read the article

  • Style Trigger on Attached Property

    - by vanja.
    I have created my own Attached Property like this: public static class LabelExtension { public static bool GetSelectable(DependencyObject obj) { return (bool)obj.GetValue(SelectableProperty); } public static void SetSelectable(DependencyObject obj, bool value) { obj.SetValue(SelectableProperty, value); } // Using a DependencyProperty as the backing store for Selectable. This enables animation, styling, binding, etc... public static readonly DependencyProperty SelectableProperty = DependencyProperty.RegisterAttached("Selectable", typeof(bool), typeof(Label), new UIPropertyMetadata(false)); } And then I'm trying to create a style with a trigger that depends on it: <!--Label--> <Style TargetType="{x:Type Label}"> <Style.Triggers> <Trigger Property="Util:LabelExtension.Selectable" Value="True"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Label}"> <TextBox IsReadOnly="True" Text="{TemplateBinding Content}" /> </ControlTemplate> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style> But I'm getting a run time exception: Cannot convert the value in attribute 'Property' to object of type 'System.Windows.DependencyProperty'. Error at object 'System.Windows.Trigger' in markup file How can I access the value of the attached property in a style trigger? I have tried using a DataTrigger with a RelativeSource binding but it wasn't pulling the value through.

    Read the article

  • How can I force the display of image "handles" in Microsoft Word 2010?

    - by Matt
    In order to select images in Microsoft Word documents you need to get the cursor just right so that it turns into the "+" arrow icon, at which point you can click to select the image. When your cursor is not in exactly the right spot you see something like this (note that the letter "m" shown in the picture is an image, not a font): When your cursor is in an appropriate spot you see something like this: For simple images with relatively straight and simple borders, it's easy; you hover over the image and you get the "+" arrow. But for smaller, more intricate images with many sides, thin borders or perhaps transparency it's often madness as you move your cursor all over the image struggling to find the teenie little spot that Word deems is selectable. Is there some means of enabling the display of "handles" (maybe wrong term) around images before you select them, so you can see the selectable spots without hunting and pecking for them?

    Read the article

  • How reduce size of PPT 2010 Notes Pages PDFs?

    - by KnowItAllWannabe
    I have a PPT presentation of about 400 slides that I periodically update and publish as PDF. The view I publish is the Notes Pages. This worked fine for several years, during which time I was using PPT 2002. I recently upgraded to PPT 2010, and now I find that the PDFs I create are about 25 times bigger than they used to be, and the text in the slides part of the Notes Pages is no longer selectable in Acrobat. According to Why does Powerpoint 2010 print notes pages to PDF as raster images? , the problem is that PPT 2010 is rendering the slides' content as images, which is not what earlier versions of PPT did. The solution offered in that discussion involves Office Automation and VBA, neither of which I know anything about, and it's not clear whether that approach solves the problem of the text in the slides not being selectable in the PDF. Isn't there a simple way to get PPT 2010 to print Notes Pages to PDF the way it did in PPT 2002?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >