Search Results

Search found 3045 results on 122 pages for 'selection'.

Page 11/122 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • TStringGrid with BOTH editing AND range selection?

    - by Kevin Killion
    Question: Can anyone point to an article or code samples anywhere on how to provide BOTH editing AND range selection in a TStringGrid? Yes, I KNOW there are third-party grids that do this, but it's frustrating that the built-in grid lacks this basic capability. Background: It's pretty normal to expect to be able to both edit a cell in a grid, and also to select a range of cells such as for a Copy operation. As delivered, TStringGrid doesn't do that. It's either/or. In fact, the docs tell us about the grid Options, "When goEditing is included in Options, goRangeSelect has no effect". However, it looks like it may be possible to do editing and rangeselects in a TStringGrid anyway!!! Through careful use of the mousedown, mouseup, selectcell and exit events, you can get dang close by switching editing elements on and off at the right times. But I still don't have it perfect, and that only covers mouse use, not keyboard changes.

    Read the article

  • JQuery invert table selection

    - by Lars Tackmann
    I have page part like this <div id="inbox"> <h1>Headline</h1> <p>First paragraph</p> <table> <tbody> <tr> <td>table stuff</td> </tr> </tbody> </table> <p>Second paragraph</p> </div> I want to assign a handler to everything within the #inbox div that is not a part (a child) of the table. I tried to do something like $('#inbox:not(:has(table))').click(function(){ alert('hello inbox'); }); But that does not work, so how do I invert the selection of the table inside the #inbox ?

    Read the article

  • Rectangular BackColor of selection in RichTextBox

    - by AgentConundrum
    Background: I'm going to start studying/coding at the local university's library. Since I'm not a student, I won't be able to utilize their wireless internet access. Since StackOverflow is such a great resource, I want to be able to take it with me, so I'm building a small desktop application to load/search/display the most recent data dumps. Problem: I want to display code blocks in the same sort of rectangular block as this site does, so I played with the RichTextBox control to try to create this effect. Unfortunately, the RichTextBox.SelectedBackColor property only colors the actual text, when what I want is a rectangle reaching to the outer limits of the selection. Example: This is what I am able to produce with the RichTextBox: This is what I would like to create: Questions: Is there any way to produce this effect using the RichTextBox? If not, are there any other controls I could use to create this effect?

    Read the article

  • eclipse: calling organizeimports programmatcally

    - by Stefan Roka
    Hi, I'm trying to execute 'OrganizeImports' programmatically on files that I'm editing programmatically. My code looks like this: final ICommandService cmdService = (ICommandService)PlatformUI.getWorkbench().getService (ICommandService.class); if (cmdService != null) { final Command cmd = cmdService.getCommand(IJavaEditorActionDefinitionIds.ORGANIZE_IMPORTS); final ExecutionEvent execEvt = new ExecutionEvent(cmd, Collections.EMPTY_MAP, compileationUnit, null); PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); ResourcesPlugin.getWorkspace(). Display.getDefault().syncExec(new Runnable() { @Override public void run() { try { //cmd.executeWithChecks(execEvt); cmd.execute(execEvt); } catch (Exception e) { getLogger().severe("organize imports failed: " + e.getMessage()); } } My problem is that OrganizeImportsAction executes on the current selection which is not the same as the compilation unit I'm editing. I would like to set the selection programmatically on the compilation unit but I don't know how to do that. Or maybe there is another way to trigger OrganizeImports. thanks, stefan

    Read the article

  • Get the corresponding row in the datatable from the selection in datagridview

    - by The King
    Hi All, I have a DataTable which is bound to datagridview (Winforms)... I use the following two lines to get the DataRow that is selected in the datagridview... int l_intSelectedRow = DataGridView1.SelectedRows[0].Index; DataRow l_drwSelectedRow = ControlGroupPostedItems.Tables["PostedItems"].Rows[l_intSelectedRow]; This works fine until the DataGridView is Sorted... When the gridview is sorted by the, I get the incorrect values (1st selection of the sorted view return 1st row of unsorted Table). How could I solve this... Is looping through the datatable the only way... Thank you.

    Read the article

  • Clean way to display/hide a bunch of buttons based on a ComboBox selection

    - by John at CashCommons
    I'm writing a standalone application in VB.NET using Visual Studio 2005. I want to display/hide a bunch of Buttons based on the selected value of a ComboBox. Each selection would have a different set of Buttons to display, and I'd like to have them arranged in a nice grid. Driving a TabControl with the ComboBox value would be the kind of behavior I want, but I don't want it to look like a TabControl to the user because it might be confusing. Is there a way to do this? Basically, I'd like Selection1 of the ComboBox to show Buttons 1-4, Selection2 to show Buttons 5-11, Selection3 to show (maybe) Buttons 1, 3, 5, 6, and 8, etc., have them arranged nicely, and have the GUI show only the ComboBox and the buttons. Thanks in advance as always!

    Read the article

  • Using Jquery, call function on selection just once

    - by maxp
    Say i have a selection of textboxes like this; var arrayoftextboxes = $('.textbox1, .textbox2, .textbox3'); Is there a way I can call a function on each one in a simpler way than this? It only needs to be called once. arrayoftextboxes.each(function(i){foo(arrayoftextboxes[i]);}); I tried arrayoftextboxes.load(function(){foo(this)}); and arrayoftextboxes.bind(function(){foo(this)}); but the functions dont seem to be called.

    Read the article

  • WPF - copy/paste selection with custom font family

    - by summergoat
    I have a custom font family embedded in my WPF application which I can reference by specifying a base URI and font family name. new FontFamily(new Uri("pack://application:,,,/Fonts/"), "./#My Custom Font Family"); However, when I copy a selection which uses this font the xaml on the clipboard resembles the following <Run Text="Foo" FontFamily="./#My Custom Font Family" /> When I paste into the same RichTextBox I lose the font as it falls back to the system default because - When a FontFamily is specified as an attribute in markup, the base URI value is always implied—its value is the URI of the XAML page. http://msdn.microsoft.com/en-us/library/system.windows.media.fontfamily.aspx and my xaml page is not located in the same directory as the custom font family. Any ideas for a workaround?

    Read the article

  • Eclipse Plugin: Enablement of an Action based on the current selection

    - by Itay
    I am using the org.eclipse.ui.popupMenus extension point for adding a sub-menu whose Action that is bounded to the following class: public class MyAction implements IObjectActionDelegate { private Logic logic = Logic.getInstance(); // Singleton public void setActivePart(IAction a, IWorkbenchPart targetPart) { // Nothing here } public void run(IAction a) { // Do something... } public void selectionChanged(IAction a, ISelection s) { a.setEnabled(logic.isEnabled(s)); } } This action is working correctly in most cases (including the call a.setEnabled() in selectionChanged()). My problem at the very first time my action is being invoked. The selectionChanged method is called only after the menu item has been displayed (and not when the user has made the selection) which means that the call to a.setEnabled() will have no affect. Any ideas on how to make my action receive selectionChanged() notifications even before the fist time it is being invoked?

    Read the article

  • Return popupmenu selection in MATLAB using one line of code

    - by Doresoom
    I have a GUI which uses a selection from a popupmenu in another callback. Is there a way to return the selected value of the popupmenu in only one line without creating any temporary variables? I've tried several solutions, but I've only managed two lines with one temporary variable: Three lines: list=get(handles.popupmenu1,'String'); val=get(handles.popupmenu1,'Value'); str=list{val}; Two lines: temp=get(handles.popupmenu1,{'String','Value'}); str=temp{1}{temp{2}}; Can anyone shave it down to one? PS, It's a dynamic menu, so I can't just use get(handles.popupmenu1,'Value') and ignore the string component altogether.)

    Read the article

  • Problems encountered in changing a CRichEditCtrl selection color.

    - by dev ray
    I have written the following code after creating the CRichEditCtrl // 06112010 : The following code was added to highlight the textselection in black color instead of the default blue color of CRichEditCtrl. - 1311 { m_EditControl.SetSel(0,100); CHARFORMAT2 cf1; cf1.cbSize = sizeof(CHARFORMAT2); m_EditControl.GetSelectionCharFormat(cf1); cf1.dwMask = CFM_BACKCOLOR ; cf1.dwEffects &= ~CFE_AUTOBACKCOLOR; cf1.crBackColor = RGB(0,0,0); m_EditControl.SetSelectionCharFormat(cf1); m_EditControl.Invalidate(); } After this I am adding text, but the selection still comes in blue color instead of Black. Could someone please tell me what I am doing wrong?? Thanks, DeV

    Read the article

  • Android ListView highlight multiple items

    - by Tobias Kuess
    I want my ListView to change its background for each selected item (Multi-Selection). I used this code: <ListView ... android:drawSelectorOnTop="false" android:listSelector="@android:color/darker_gray" > This works fine, but it is just possible to select one single item of the list. If I select another one the selection is resetted and the new one changes its background. Is there an easy and fast way to make it possible to select more than one item at the same time with changing the background of every selected item?

    Read the article

  • Eclipse Plugin: Enablement of an Action based on the current selection - before the

    - by Itay
    Here's my problem: I am using the org.eclipse.ui.popupMenus extension point for adding a sub-menu whose Action that is bounded to the following class: public class MyAction implements IObjectActionDelegate { private Logic logic = Logic.getInstance(); // Singleton public void setActivePart(IAction a, IWorkbenchPart targetPart) { // Nothing here } public void run(IAction a) { // Do something... } public void selectionChanged(IAction a, ISelection s) { a.setEnabled(logic.isEnabled(s)); } } This action is working correctly in most cases (including the call a.setEnabled() in selectionChanged()). My problem at the very first time my action is being invoked. The selectionChanged method is called only after the menu item has been displayed (and not when the user has made the selection) which means that the call to a.setEnabled() will have no affect. Any ideas on how to make my action receive selectionChanged() notifications even before the fist time it is being invoked?

    Read the article

  • Design best practice - best way to handle user selection

    - by user1457227
    I'm an experienced developer (WPF) moving over to Android development. My question: an app I am developing allows the user to browse their local storage (such as SDCARD) and select a file. Now, should I simply create a new Activity (after the user has made a selection) to handle what I want to have the app do with that chosen file, -or- is the better approach to pass the path/name of the selected file back to the main Activity and let IT launch the next Activity? In other words, is the better practice to have the main Activity launch other (support) activities, or is it perfectly ok and normal to have one activity chain to another and on and on? Thanks!

    Read the article

  • MonthCalendar control selection range with EnableVisualStyles?

    - by warren_s
    I'm using the MonthCalendar control and want to programmatically select a date range. When I do so the control doesn't paint properly if Application.EnableVisualStyles() has been called. This is a known issue according to MSDN. Using the MonthCalendar with visual styles enabled will cause a selection range for the MonthCalendar control to not paint correctly (from: http://msdn.microsoft.com/en-us/library/system.windows.forms.monthcalendar.aspx) Is there really no fix for this other than not calling EnableVisualStyles? This seems to make that particular control entirely useless for a range of applications and a rather glaring oversight from my perspective.

    Read the article

  • Wpf combobox selection change breaks Datatrigger

    - by biju
    Hi, I am trying to set the selected value of a combobox from a style trigger.It works as long as we dont manually change any value in the combobox.But it stops working altogether after manually changing the selection.How can i solve this.A sample code is attached.Please do help <Window x:Class="InputGesture.Window2" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:InputGesture" Title="Window2" Height="300" Width="300" Name="Sample"> <Window.Resources> <Style TargetType="{x:Type ComboBox}"> <Setter Property="ComboBox.SelectedValue" Value="1"/> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=chk,Path=IsChecked}" Value="True"> <Setter Property="ComboBox.IsEnabled" Value="False"/> <Setter Property="ComboBox.SelectedValue" Value="2"/> </DataTrigger> </Style.Triggers> </Style> </Window.Resources> <StackPanel> <CheckBox Name="chk" Height="23"/> <ComboBox Name="cmb" Height="23" DisplayMemberPath="Name" SelectedValuePath="Id" ItemsSource="{Binding ElementName=Sample,Path=DT}"> </ComboBox> <Button Height="23" Click="Button_Click"/> </StackPanel> </Window>

    Read the article

  • C# WPF Paginator printer ignoring user's printer selection

    - by Anders
    I am using the following code in my project. The print dialog shows, but it always prints on the default printer regardless of the user's selection. I have read similar topics but none of them seem to use the SerializerWriterCollator. What is the problem? PrintQueue printQueue = LocalPrintServer.GetDefaultPrintQueue(); XpsDocumentWriter xpsWriter = PrintQueue.CreateXpsDocumentWriter(printQueue); SerializerWriterCollator batchPrinter = xpsWriter.CreateVisualsCollator(); var printDialog = new PrintDialog(); if (printDialog.ShowDialog() == true) { PrintTicket ticket = printDialog.PrintTicket; ticket.PageOrientation = PageOrientation.Landscape; var paginator1 = new PagePrinter(winchFlightsCount, new Size(printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight), winchFlights); var paginator2 = new PagePrinter(tugFlightCount, new Size(printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight), tugFlights); var paginator3 = new PagePrinter(selfFlightCount, new Size(printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight), selfFlights); batchPrinter.BeginBatchWrite(); for (int i = 0; i < paginator1.PageCount; i++) { batchPrinter.Write(paginator1.GetPage(i).Visual, ticket); } for (int i = 0; i < paginator2.PageCount; i++) { batchPrinter.Write(paginator2.GetPage(i).Visual, ticket); } for (int i = 0; i < paginator3.PageCount; i++) { batchPrinter.Write(paginator3.GetPage(i).Visual, ticket); } batchPrinter.EndBatchWrite(); } }

    Read the article

  • Style row banding and selection in tr:table using CSS

    - by Alex Larzelere
    I've got a tr:table that I need to style using CSS. All the normal style functions of a table are working, but row banding and row selection aren't coming up. When I view the rendered source, I'm not seeing a difference in the rows for an id or class to grab on to, and the official documentation doesn't have any attributes for declaring a style class for either. Is this possible and if so what do I need to do to get my CSS to grab onto it? <tr:table id="myTable" value="#{tableValues}" rowBandingInterval="1"> <tr:column> ##Stuff## </tr:column> <tr:column> ##Stuff## </tr:column> <tr:column> ##Stuff## </tr:column> </tr:table> Edit Let me try to clairfy what's happening. First, using the declaration above tells jsf to generate a table, and the attribute rowBandingInterval tells it to give each row alternating colors (If it was set to 2, then it would do 2 rows one color, 2 rows another, 2 rows the original, etc.) Once the page gets rendered into standard html, trinidad (and jsf) apply their own classes and IDs to the html. My normal procedure is to look at the rendered html, find the class that it is appling and add CSS rules for it. However in this case, no additional styles are added (nothing in the rendered html denotes one row to be different from another). So the question is, how do I tell trinidad to either give alternating rows and the user selected row different classes/IDs for me to grab on to with CSS?

    Read the article

  • Row selection based on subtable data in MySQL

    - by Felthragar
    I've been struggling with this selection for a while now, I've been searching around StackOverflow and tried a bunch of stuff but nothing that helps me with my particular issue. Maybe I'm just missing something obvious. I have two tables: Measurements, MeasurementFlags "Measurements" contain measurements from a device, and each measurement can have properties/attributes attached to them (commonly known as "flags") to signify that the measurement in question is special in some way or another (for instance, one flag may signify a test or calibration measurement). Note: One record per flag! Right, so a record from the "Measurements" table can theoreticly have an unlimited amount of MeasurementFlags attached to it, or it can have none. Now, I need to select records from "Measurements", that have an attached "MeasurementFlag" valued "X", but it must also NOT have a flag valued "Y" attached to it. We're talking about a fairly large database with hundreds of millions of rows, which is why I'm trying to keep all of this logic within one query. Splitting it up would create too many queries, however if it's not possible to do in one query I guess I don't have a choise. Thanks in advance.

    Read the article

  • How to manage a single-selection (exclusive) list?

    - by Andy
    I've got a detail view that consists of a table view with a few rows of data. I can fill the rows just fine, and moving back and forth from the parent view to the subview works too. This detail view should allow the user to select a single value, placing a checkmark accessory in the cell and then returning to the parent view (where the selected value becomes the cell.textLabel.text property of the cell from which the detail view was called). This all works as of right now. However, when the user taps the cell in the parent view to go back to the detail view (to change their selection), my checkmark has disappeared and I cannot for the life of me figure out how to make it stay. Here's my cellForRowAtIndexPath: method: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; } NSString *labelText = [[phones objectAtIndex:indexPath.row] valueForKey:@"phoneNumberLabel"]; cell.textLabel.text = labelText; NSString *currentLabel = [ruleBuilder.tableView cellForRowAtIndexPath:selectedIndexPath].textLabel.text; if (labelText == currentLabel) { cell.accessoryType = UITableViewCellAccessoryCheckmark; } NSString *detailText = [[phones objectAtIndex:indexPath.row] valueForKey:@"phoneNumber"]; cell.detailTextLabel.text = detailText; return cell; } I've checked out Apple's sample code for exclusive-list management in Table View Programming Guide, but the snippet seems incomplete, and I can't find the related code in Apple's sample code. This doesn't seem like it ought to be that hard to do.

    Read the article

  • Handling row selection from a simple grid using jquery and asp.net mvc

    - by Jonn
    Using a simple table and jquery, how would you manually handle selection using jquery? So far, I've managed to add a gridrowselected class on the tr when the click event is called so that I'll know which row is currently selected. But I don't know how to pass the selected data back to the controller (or at least an index I placed on the row). I tried something like this $(function() { $('#ProjectList .gridrow').click(function() { // Get row's index var projectId = $(this).find('input[name$=ProjectId]').val(); // Remove the input if it already exists var parentForm = $(this).parents('form'); parentForm.remove('input[name="selectedRows"][value="' + projectId + '"]'); // If it is selected, create the form. If it's not selected then the input just gets removed (the user must have clicked on it and deselected the row) if ($(this).hasClass('gridrow-selected') === true) { parentForm.append($('<input>', { type: "hidden", name: "selectedRows", value: projectId })); } }); }); which I'm expecting to create a hidden input so that when I post, selectedRows gets passed onto the controller. But all it does is create the input, but the data still doesn't get passed to the controller.

    Read the article

  • Exclude notes based on attribute wildcard in XSL node selection

    - by C A
    Using cruisecontrol for continuous integration, I have some annoyances with Weblogic Ant tasks and how they think that server debug information are warnings rather than debug, so are shown in my build report emails. The XML output from cruise is similar to: <cruisecontrol> <build> <target name="compile-xxx"> <task name="xxx" /> </target> <target name="xxx.weblogic"> <task name="wldeploy"> <message priority="warn">Message which isn't really a warning"</message> </task> </target> </build> </cruisecontrol> In the cruisecontrol XSL template the current selection for the task list is: <xsl:variable name="tasklist" select="/cruisecontrol/build//target/task"/> What I would like is something which selects the tasklist in the same way, but doesn't include any target nodes which have the attribute name="*weblogic" where * is a wildcard. I have tried <xsl:variable name="tasklist" select="/cruisecontrol/build//target[@name!='*weblogic']/task"/> but this doesn't seem to have worked. I'm not an expert with XSLT, and just want to get this fixed so I can carry on the real development of the project. Any help is much appreciated.

    Read the article

  • Exclude nodes based on attribute wildcard in XSL node selection

    - by C A
    Using cruisecontrol for continuous integration, I have some annoyances with Weblogic Ant tasks and how they think that server debug information are warnings rather than debug, so are shown in my build report emails. The XML output from cruise is similar to: <cruisecontrol> <build> <target name="compile-xxx"> <task name="xxx" /> </target> <target name="xxx.weblogic"> <task name="wldeploy"> <message priority="warn">Message which isn't really a warning"</message> </task> </target> </build> </cruisecontrol> In the cruisecontrol XSL template the current selection for the task list is: <xsl:variable name="tasklist" select="/cruisecontrol/build//target/task"/> What I would like is something which selects the tasklist in the same way, but doesn't include any target nodes which have the attribute name="*weblogic" where * is a wildcard. I have tried <xsl:variable name="tasklist" select="/cruisecontrol/build//target[@name!='*weblogic']/task"/> but this doesn't seem to have worked. I'm not an expert with XSLT, and just want to get this fixed so I can carry on the real development of the project. Any help is much appreciated.

    Read the article

  • Static selection and Ruby on Rails objects

    - by Dave
    Hi all- I have a simple problem, but am having trouble wrapping my head around it. I have an video object that should have one or more "genres". This list of genres should be prepopulated and then the user should just select one or more using autocomplete or some such. Here is the question: Is it worth creating a table with genres for the static selection? Or should it just be included in the presentation layer? If there is a static table, how do we name it correctly. I envision something like this class Video < ActiveRecord::Base has_many :genres ... end class Genre < ... belongs_to :video ... end But then we get a table called genre, that basically maps all the selected genres to their parent videos. There would need to be some static table to reference the static genres. Is this the best way to do it? Sorry if this was rambl-y a little stream of conciousness. Thanks!

    Read the article

  • manipulating radio box selection with javascript

    - by Crays
    Hi guys, i'm trying to do a poll but i designed it without any radio box in it. So i decided to make the selection being highlighted with a different background color, all is done with jquery. I set the display of the radio box to none so that it wouldn't show, gave each a unique ID. Here's the script. <form action="v_poll.php" method="post"> <ul class="voting"> <li class="voting votetext"><input type="radio" name="voting" value="a1" style="display:none;" id="a1"><a onClick="vote('a1')"Answer 1</a></li> <li class="voting votetext"><input type="radio" name="voting" value="a2" style="display:none;" id="a2"><a onClick="vote('a2')">Answer 2</a></li> <li class="voting votetext"><input type="radio" name="voting" value="a3" style="display:none;" id="a3"><a onClick="vote('a3')">Answer 3</a></li> <input type="hidden" value="1" name="id" /> <input type="submit" value="submit"> </ul> </form> <script type="text/javascript"> function vote(TheValue) { GetElementById(TheValue).checked=true; } </script> But when i checked the value of the radio box with $_POST['voting'], it is blank. Not the value assigned to the radio box. Anything i'm doing wrong? Please help. Thanks.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >