Search Results

Search found 3931 results on 158 pages for 'roulette wheel selection'.

Page 15/158 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • 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

  • Elantech trackpad being identified as a logitech wheel mouse.

    - by Nathan Cox
    I recently purchased a Samsung RF510 laptop computer, which I absolutely love. However, upon installing Ubuntu 10.10 onto it I couldn't get the trackpad to function properly. It worked as a basic mouse (point and click) but had no functionality for edge scrolling or any of the multitouch settings the trackpad is capable of. After doing a lot of research I discovered the reason is a known issue where the Ubuntu kernel will improperly detect an Elantech trackpad as a logitech PS/2 wheel mouse, and as such will gain none of the functionality that seems to be coded for synaptics trackpads. The question I have is: does anyone know a way to get this working properly? This is my first time trying to run Ubuntu on a laptop (actually, it's my first laptop in the last 12 years) and I'm finding the experience to be intolerable without the basic scrolling/zooming/etc I've been used to using for as long as I can remember.

    Read the article

  • Assemble static site from templates? (don't want to reinvent the wheel)

    - by raindog308
    I have a site that is 100% static content (no php, just some javascript). There's several "blocks" like the header, menu, footer, etc. that are the same on each page. Rather than do a lot of copy/pasting, I was thinking of some kind of template system where I could run a CLI command (in php, perl, python, shell, whatever) and have it replace all the block tags with the actual block text. I did see some answers in this question, but those seem oriented towards "we provide the style and layout, you provide the text". In my case, I have everything as far as layout, css, etc. - just want to do a glorified sed. Before I invent the wheel, I was wondering if there was a tool out there already.

    Read the article

  • How to grant su access to wheel without asking for password on FreeBSD?

    - by cstamas
    I would like to grant users of the wheel group (other sysadmins) su access without being asked for password. I know how to do it with pam in linux, but the question now is for FreeBSD. I am not familiar with the syntax for FreeBSD's PAM subsystem. What shall I enter in /etc/pam.d/su instead of the default: auth sufficient pam_rootok.so no_warn auth sufficient pam_self.so no_warn auth requisite pam_group.so no_warn group=wheel root_only fail_safe ruser auth include system # account account include system # session session required pam_permit.so

    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

  • 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

  • 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

  • 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

  • Excel: Automating the Selection of an Unknown Number of Cells

    - by user1905080
    I’m trying to automate the formatting of an excel file by a macro and am seeking a solution. I have two columns titled Last Name and First Name which I would like to concatenate into a separate column titled Last Name, First Name. This is simple enough when done by hand: create one cell which does this, then drag that cell to include all cells within the range. The problem appears when trying to automate this. Because I can’t know the number of names that need to be concatenated ahead of time, I can’t automate the selection of cells by dragging. Can you help me automate this? I’ve tried a process of copying the initial concatenated cell, highlighting the column, and then pasting. I’ve also tried to use a formula which returned the concatenation only if there is text in the “Last Name” and “First Name” columns. However, in both cases, I end up with some 100,000 rows, putting a serious cramp on my ability to manipulate the worksheet. The best solution I can think of is to create concatenations within a fixed range of cells. Although this would create useless cells, at least there wouldn’t be 99,900 of them.

    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 | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >