Search Results

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

Page 30/158 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Macro to Add using System.Linq

    - by Aligned
    I have Visual Studio 2010 setup to remove and sort settings on save with the Power Commands extensions. This is great, but sometimes it removes the using System.Linq at the top. I also find myself scrolling to the top to add the using when I first add System.Linq. So I wrote a quick macro to do it for me. Sub AddUsingLinq()        DTE.ActiveDocument.Selection.StartOfDocument()        DTE.ActiveDocument.Selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)        DTE.ActiveDocument.Selection.Text = "using System.Linq;"        DTE.ActiveDocument.Selection.NewLine()        DTE.ExecuteCommand("Edit.FormatDocument")        DTE.ExecuteCommand("Edit.RemoveAndSort")        DTE.ActiveDocument.Save() DTE.ExecuteCommand("View.NavigateBackward")    End SubHook this up to a shortcut (tools -> options -> keyboard, I chose ctrl + x, c) and you'll be moving faster than ever.

    Read the article

  • Are there any web-based Linux image builders that allow selection of preinstalled packages?

    - by Series8217
    I know of one: The Angstrom Linux distribution has an online builder (called Narcissus) that allows you to select what applications you want preinstalled in the OS, then builds a working image of it for you to download and run from a flash drive. Is there anything like that for more popular distributions like Red Hat, Fedora, Ubuntu, or Debian? I think this would be particularly useful for virtual appliances and server deployment.

    Read the article

  • Is it possible to use different zsh menu selection behaviour for different commands?

    - by kine
    I'm using the menu select behaviour in zsh, which invokes a menu below the cursor where you can see the various possibilities. The .zshrc option i have set for this is zstyle ':completion:*' menu select=2 By default, pressing Return to select a possibility in this menu only completes the word — it does not actually send the command. For example, I might get a menu like this ~ % cd de<TAB> completing directory: [Desktop/] Development/ Pressing Return here will result in ~ % cd Desktop/ I then have to press Return a second time to actually send the command. I can modify this behaviour to make it so that pressing Return both selects the completion and sends the command by doing this bindkey -M menuselect '^M' .accept-line However, there's a problem with this: sometimes I need to complete a file or directory without sending the command. For example, I might need to do ln -s Desktop Desktop2 — with this bindkey behaviour, trying to complete Desktop will result in ln -s Desktop/ being sent as the command, and obviously I don't want that. I'm aware that just pressing space will let me get on with the command, but it's now a habit. Given this, is there a way to make it so that only some commands let you press Return once (like cd), but all other commands require pressing it twice?

    Read the article

  • Excel Macro Runtime error 428 in Excel 2003

    - by Adam
    Hi I have created a xlt excel template which works fine in Excel 2007 under compatibility mode and shows no errors on compatibility check. The template runs a number of Macros which creates pivot tables and charts. When a colleague tries to run the same xlt on excel 2003 they get a Runtime error 428 (Object does not support this property or method). The runtime error fails at this point; ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "raw!R1C1:R65536C37", Version:=xlPivotTableVersion10).CreatePivotTable _ TableDestination:="Frontpage!R7C1", TableName:="PivotTable2", _ DefaultVersion:=xlPivotTableVersion10 Any help would be appreciated. This is the full Macro; Sub Auto_Open() ' ' ImportData Macro ' Macro to import data, Data must be in your local D: Drive and named raw.csv ' ' Sheets("raw").Select With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;d:\raw.csv", Destination:=Range _ ("$A$1")) .Name = "raw_1" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = 850 .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = False .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = True .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With ' ' AddMonthColumn Macro ' ' Sheets("raw").Select Range("AK1").Select ActiveCell.FormulaR1C1 = "Month" Range("AK2").FormulaR1C1 = "=DATE(YEAR(RC[-36]),MONTH(RC[-36]),1)" LastRow = ActiveSheet.UsedRange.Rows.Count Range("AK2").AutoFill Destination:=Range("AK2:AK" & LastRow) Columns("AK:AK").EntireColumn.AutoFit Columns("AK:AK").Select Selection.NumberFormat = "mmmm" With Selection .HorizontalAlignment = xlCenter End With Columns("AK:AK").EntireColumn.AutoFit Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False ' ' Add Report Information [Text] ' Sheets("Frontpage").Select Range("A2:N2").Select Selection.Merge ActiveCell.FormulaR1C1 = "Service Activity Report" With Selection.Font .Size = 20 End With Range("A3:N3").Select Selection.Merge ActiveCell.FormulaR1C1 = InputBox("Customer Name") With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter End With Range("A4:N4").Select Selection.Merge ActiveCell.FormulaR1C1 = InputBox("Date Range dd/mm/yyyy - dd/mm/yyyy") With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter End With ' ' IncidentsbyPriority Macro ' ' Sheets("Frontpage").Select Range("A7").Select ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "raw!R1C1:R65536C37", Version:=xlPivotTableVersion10).CreatePivotTable _ TableDestination:="Frontpage!R7C1", TableName:="PivotTable2", _ DefaultVersion:=xlPivotTableVersion10 Sheets("Frontpage").Select Cells(7, 1).Select ActiveSheet.Shapes.AddChart.Select ActiveChart.SetSourceData Source:=Range("Frontpage!$A$7:$H$22") ActiveChart.ChartType = xlColumnClustered With ActiveSheet.PivotTables("PivotTable2").PivotFields("Priority") .Orientation = xlRowField .Position = 1 End With ActiveSheet.PivotTables("PivotTable2").AddDataField ActiveSheet.PivotTables( _ "PivotTable2").PivotFields("Case ID"), "Count of Case ID", xlCount ActiveChart.Parent.Name = "IncidentsbyPriority" ActiveChart.ChartTitle.Text = "Incidents by Priority" Dim RngToCover As Range Dim ChtOb As ChartObject Set RngToCover = ActiveSheet.Range("D7:L16") Set ChtOb = ActiveSheet.ChartObjects("IncidentsbyPriority") ChtOb.Height = RngToCover.Height ' resize ChtOb.Width = RngToCover.Width ' resize ChtOb.Top = RngToCover.Top ' reposition ChtOb.Left = RngToCover.Left ' reposition ' ' IncidentbyMonth Macro ' ' Sheets("Frontpage").Select ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "raw!R1C1:R65536C37", Version:=xlPivotTableVersion10).CreatePivotTable _ TableDestination:="Frontpage!R18C1", TableName:="PivotTable4", _ DefaultVersion:=xlPivotTableVersion10 Sheets("Frontpage").Select Cells(18, 1).Select ActiveSheet.Shapes.AddChart.Select ActiveChart.SetSourceData Source:=Range("Frontpage!$A$18:$H$38") ActiveChart.ChartType = xlColumnClustered With ActiveSheet.PivotTables("PivotTable4").PivotFields("Month") .Orientation = xlRowField .Position = 1 End With ActiveSheet.PivotTables("PivotTable4").AddDataField ActiveSheet.PivotTables( _ "PivotTable4").PivotFields("Case ID"), "Count of Case ID", xlCount ActiveChart.Parent.Name = "IncidentbyMonth" ActiveChart.ChartTitle.Text = "Incidents by Month" Dim RngToCover2 As Range Dim ChtOb2 As ChartObject Set RngToCover2 = ActiveSheet.Range("D18:L30") Set ChtOb2 = ActiveSheet.ChartObjects("IncidentbyMonth") ChtOb2.Height = RngToCover2.Height ' resize ChtOb2.Width = RngToCover2.Width ' resize ChtOb2.Top = RngToCover2.Top ' reposition ChtOb2.Left = RngToCover2.Left ' reposition ' ' IncidentbyCategory Macro ' ' Sheets("Frontpage").Select ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "raw!R1C1:R65536C37", Version:=xlPivotTableVersion10).CreatePivotTable _ TableDestination:="Frontpage!R38C1", TableName:="PivotTable6", _ DefaultVersion:=xlPivotTableVersion10 Sheets("Frontpage").Select Cells(38, 1).Select ActiveSheet.Shapes.AddChart.Select ActiveChart.SetSourceData Source:=Range("Frontpage!$A$38:$H$119") ActiveChart.ChartType = xlColumnClustered With ActiveSheet.PivotTables("PivotTable6").PivotFields("Category 2") .Orientation = xlRowField .Position = 1 End With With ActiveSheet.PivotTables("PivotTable6").PivotFields("Category 3") .Orientation = xlPageField .Position = 1 End With ActiveSheet.PivotTables("PivotTable6").AddDataField ActiveSheet.PivotTables( _ "PivotTable6").PivotFields("Case ID"), "Count of Case ID", xlCount ActiveChart.Parent.Name = "IncidentbyCategory" ActiveChart.ChartTitle.Text = "Incidents by Category" Dim RngToCover3 As Range Dim ChtOb3 As ChartObject Set RngToCover3 = ActiveSheet.Range("D38:L56") Set ChtOb3 = ActiveSheet.ChartObjects("IncidentbyCategory") ChtOb3.Height = RngToCover3.Height ' resize ChtOb3.Width = RngToCover3.Width ' resize ChtOb3.Top = RngToCover3.Top ' reposition ChtOb3.Left = RngToCover3.Left ' reposition ' ' IncidentsbySiteandPriority Macro ' ' Sheets("Frontpage").Select Range("A71").Select ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "raw!R1C1:R65536C37", Version:=xlPivotTableVersion10).CreatePivotTable _ TableDestination:="Frontpage!R71C1", TableName:="PivotTable3", _ DefaultVersion:=xlPivotTableVersion10 Sheets("Frontpage").Select Cells(71, 1).Select ActiveSheet.Shapes.AddChart.Select ActiveChart.SetSourceData Source:=Range("Frontpage!$A$71:$H$90") ActiveChart.ChartType = xlColumnClustered With ActiveSheet.PivotTables("PivotTable3").PivotFields("Site Name") .Orientation = xlRowField .Position = 1 End With With ActiveSheet.PivotTables("PivotTable3").PivotFields("Priority") .Orientation = xlColumnField .Position = 1 End With ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Case ID"), "Count of Case ID", xlCount ActiveChart.Parent.Name = "IncidentbySiteandPriority" ' ActiveChart.ChartTitle.Text = "Incidents by Site and Priority" Dim RngToCover4 As Range Dim ChtOb4 As ChartObject Set RngToCover4 = ActiveSheet.Range("H71:O91") Set ChtOb4 = ActiveSheet.ChartObjects("IncidentbySiteandPriority") ChtOb4.Height = RngToCover4.Height ' resize ChtOb4.Width = RngToCover4.Width ' resize ChtOb4.Top = RngToCover4.Top ' reposition ChtOb4.Left = RngToCover4.Left ' reposition Columns("A:G").Select Range("A52").Activate Columns("A:G").EntireColumn.AutoFit End Sub

    Read the article

  • Implementing a runtime Look Up Table in C#

    - by Yarok
    Hey all, I'm currently working on a robot interface GUI, using C#. The robot has two sensors, and two powered wheels. I need to let the user the option to load a Look Up Table (LUT) during runtime, one for each sensor, that will tell the robot what to do according to the sensor's reading. I think the best way to do it is using a .csv file, formatted like so: index , right wheel order, left wheel order the index is an int between 0-1023 and is actually the sensor's reading. the orders for the right and left wheel are integers, between -500 - 500. Example - left sensor's readings: 1,10,20 meaning: sensor reads 1 -- left wheel 10 rpm right wheel 20 rpm So my question is this: what is the best way to implement it? using a dataset?(if so, how?) using an array? (if so, how do I load it during runtime?) Any help would be much appreciated, Yarok

    Read the article

  • Searching a document for multiple terms in VBA?

    - by Tony
    I'm trying to create a macro to be used in Microsoft Word 2007 that will search a document for multiple keywords (string variables) located in an external Excel file (the reason for having it in an external file is that the terms will often be changed and updated). I've figured out how to search a document paragraph by paragraph for a single term and color every instance of that term, and I assumed that the proper method would be to use a dynamic array as the search term variable. The question is: how do I get the macro to create an array containing all the terms from an external file and search each paragraph for each and every term? This is what I have so far: Sub SearchForMultipleTerms() ' Dim SearchTerm As String 'declare search term SearchTerm = InputBox("What are you looking for?") 'prompt for term. this should be removed, as the terms should come from an external XLS file rather than user input. Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatti… With Selection.Find .Text = SearchTerm 'find the term! .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With While Selection.Find.Execute Selection.GoTo What:=wdGoToBookmark, Name:="\Para" 'select paragraph Selection.Font.Color = wdColorGray40 'color paragraph Selection.MoveDown Unit:=wdParagraph, Count:=1 'move to next paragraph Wend End Sub Thanks for looking!

    Read the article

  • Problem changing Java version using alternatives

    - by Brian Lewis
    I'm not quite sure how I got into this mess, but for some reason I'm not able to change the current version of Java using alternatives. I can run alternatives --config java and type my selection but when I echo the version number for either java or javac, it spits back out 1.5 every time (despite alternatives showing the current version is 1.6). The server I'm working with is running RHEL5, by the way. I have verified that the paths used in alternatives are pointing to the correct directories. Here's some output from my session: [brilewis@myserver]$ sudo /usr/sbin/update-alternatives --config java There are 3 programs which provide 'java'. Selection Command ** 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java + 2 /usr/java/jdk1.5.0_10/bin/java 3 /usr/java/jdk1.6.0_16/bin/java Enter to keep the current selection[+], or type selection number: 3 [brilewis@myserver]$ java -version java version "1.5.0_10" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03) Java HotSpot(TM) Server VM (build 1.5.0_10-b03, mixed mode) [brilewis@myserver]$ sudo /usr/sbin/update-alternatives --config java There are 3 programs which provide 'java'. Selection Command ** 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java 2 /usr/java/jdk1.5.0_10/bin/java + 3 /usr/java/jdk1.6.0_16/bin/java Enter to keep the current selection[+], or type selection number:

    Read the article

  • Word Automation : Replace do not work after TypeText

    - by wishper
    I need to generate doc (real doc, not docx) files, the "best" way i have found is to use word automation (Word 2010). I have files that I open, and then replace values inside before saving it on a new name. (Ex : I replace "" with "155023"). To do this, I use the Application.Selection.Find. I just had a problem when the new value had more than 255 characters (Thanks Microsofts limitations ...). To avoid this problem, i use TypeText in this case. My problem now is once I use TypeText, the Replace do not work anymore .. And I can't find why. Any idea will be greatly appreciated. My code is in a function, called in a foreach with each values to replace : private void Replace(Application app, string name, string newValue) { Selection selection = app.Selection; Find find = selection.Find; Replacement replacement = find.Replacement; find.ClearFormatting(); find.Text = "<" + name + ">"; // Word limitation : can't replace with more than 255 characters, // use another way to do it if that's the case if (tempNewValue.Length < 255) { replacement.ClearFormatting(); replacement.Text = tempNewValue; find.Execute(Replace: replaceAll); } else { while (find.Execute()) { selection.TypeText(tempNewValue); } } Marshal.ReleaseComObject(replacement); Marshal.ReleaseComObject(find); Marshal.ReleaseComObject(selection); }

    Read the article

  • PHPUnit installed but class PHPUnit_TestCase not found

    - by Greg K
    Talk about falling at the first hurdle. My test script: <?php require_once('PHPUnit/Framework.php'); class TransferResponseTest extends PHPUnit_TestCase { ... } Running my test case: $ phpunit TransferResponseTest Fatal error: Class 'PHPUnit_TestCase' not found in /Volumes/Data/greg/code/syndicate/tests/TransferResponseTest.php on line 5 $ php -i | grep include_path include_path => .:/usr/lib/php => .:/usr/lib/php $ ls -l /usr/lib/php/PHPUnit/ total 8 drwxr-xr-x 16 root wheel 544 27 Mar 19:03 Extensions drwxr-xr-x 28 root wheel 952 27 Mar 19:03 Framework -rw-r--r-- 1 root wheel 3193 27 Mar 19:03 Framework.php drwxr-xr-x 8 root wheel 272 27 Mar 19:03 Runner drwxr-xr-x 5 root wheel 170 27 Mar 19:03 TextUI drwxr-xr-x 32 root wheel 1088 27 Mar 19:03 Util I copied /etc/php.ini-default to /etc/php.ini and explicitly specified the include path as /usr/lib/php/ with an end / but still no success. $ php -i | grep include_path include_path => .:/usr/lib/php/ => .:/usr/lib/php/ $ phpunit TransferResponseTest.php PHP Fatal error: Class 'PHPUnit_TestCase' not found in /Volumes/Data/greg/code/syndicate/tests/TransferResponseTest.php on line 5 $ phpunit --version PHPUnit 3.4.11 by Sebastian Bergmann. Any ideas?

    Read the article

  • Update rich:dataTable binding on Ajax selectionchange

    - by MilkJug
    I want to find the current selection of the data table whenever a selection changes. I can update other items using: <a4j:ajax render=":tmp,:tmp2" event="selectionchange"> But I cannot find the current selection - I think the major issue is that the UIExtendedDataTable backing does not get updated on the Ajax request. Is there a way to update the current selection on a selectionchange (Using RichFaces 4)?

    Read the article

  • What is user/owner 24561?

    - by ralphthemagician
    So, I just installed the node.js package from nodejs.org and I was poking around to see what it installed. Over in /usr/local/bin I saw this owner 24561. I see it in a few other places too. What is this? What does it mean? Should it be root like everything else? lrwxr-xr-x 1 root wheel 66 Jun 23 13:02 mate -> /Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate -rwxr-xr-x 1 24561 wheel 18865984 Jun 29 09:32 node -rwxr-xr-x 1 24561 wheel 355 Jun 29 09:32 node-waf lrwxr-xr-x 1 root wheel 38 Jul 3 12:15 npm -> ../lib/node_modules/npm/bin/npm-cli.js What was curious is that I couldn't find any other information about this user by Googling. Using OS X Lion 10.7.4 with Xcode installed if that makes any difference.

    Read the article

  • Troubleshooting sudoers via ldap

    - by dafydd
    The good news is that I got sudoers via ldap working on Red Hat Directory Server. The package is sudo-1.7.2p1. I have some LDAP/Kerberos users in an LDAP group called wheel, and I have this entry in LDAP: # %wheel, SUDOers, example.com dn: cn=%wheel,ou=SUDOers,dc=example,dc=com cn: %wheel description: Members of group wheel have access to all privileges. objectClass: sudoRole objectClass: top sudoCommand: ALL sudoHost: ALL sudoUser: %wheel So, members of group wheel have administrative privileges via sudo. This has been tested and works fine. Now, I have this other sudo privilege set up to allow members of a group called Administrators to perform two commands as the non-root owner of those commands. # %Administrators, SUDOers, example.com dn: cn=%Administrators,ou=SUDOers,dc=example,dc=com sudoRunAsGroup: appGroup sudoRunAsUser: appOwner cn: %Administrators description: Allow members of the group Administrators to run various commands . objectClass: sudoRole objectClass: top sudoCommand: appStop sudoCommand: appStart sudoCommand: /path/to/appStop sudoCommand: /path/to/appStart sudoUser: %Administrators Unfortunately, members of Administrators are still refused permission to run appStart or appStop: -bash-3.2$ sudo /path/to/appStop [sudo] password for Aaron: Sorry, user Aaron is not allowed to execute '/path/to/appStop' as root on host.example.com. -bash-3.2$ sudo -u appOwner /path/to/appStop [sudo] password for Aaron: Sorry, user Aaron is not allowed to execute '/path/to/appStop' as appOwner on host.example.com. /var/log/secure shows me these two sets of messages for the two attempts: Oct 31 15:02:36 host sudo: pam_unix(sudo:auth): authentication failure; logname=Aaron uid=0 euid=0 tty=/dev/pts/3 ruser= rhost= user=Aaron Oct 31 15:02:37 host sudo: pam_krb5[1508]: TGT verified using key for 'host/[email protected]' Oct 31 15:02:37 host sudo: pam_krb5[1508]: authentication succeeds for 'Aaron' ([email protected]) Oct 31 15:02:37 host sudo: Aaron : command not allowed ; TTY=pts/3 ; PWD=/auto/home/Aaron ; USER=root ; COMMAND=/path/to/appStop Oct 31 15:02:52 host sudo: pam_unix(sudo:auth): authentication failure; logname=Aaron uid=0 euid=0 tty=/dev/pts/3 ruser= rhost= user=Aaron Oct 31 15:02:52 host sudo: pam_krb5[1547]: TGT verified using key for 'host/[email protected]' Oct 31 15:02:52 host sudo: pam_krb5[1547]: authentication succeeds for 'Aaron' ([email protected]) Oct 31 15:02:52 host sudo: Aaron : command not allowed ; TTY=pts/3 ; PWD=/auto/home/Aaron ; USER=appOwner; COMMAND=/path/to/appStop The questions: Does sudo have some sort of verbose or debug mode where I can actually watch it capture the sudoers privilege list and determine whether or not Aaron should have the privilege to run this command? (This question is probably independent of where the sudoers database is kept.) Does sudo work with some background mechanism that might have a log level I could turn up? Right now, I can't fix a problem I can't identify. Is this an LDAP search failure? Is this a group member matching failure? Identifying why the command fails will help me identify the fix... Next step: Recreate the privilege in /etc/sudoers, and see if it works locally... Cheers!

    Read the article

  • ListView selection issue...Using onItemClick(AdapterView<?> parent, View view, ...)

    - by searchMaker
    The problem I hope to resolve here is that when I click on one item in the ListView that item's background changes to light gray, but when I continue to scroll through the list every 4th item has the background changed to light gray even though those other items have not been clicked. How do I make only the item I clicked be effected by the click? ListView lv = (ListView) findViewById(R.id.resultsList); lv.setAdapter(new ArrayAdapter(this, R.layout.resultitem, (String[])labelList.toArray(new String[labelList.size()]))); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View view, int position, long id) { TextView tv = (TextView)view.findViewById(R.id.result); tv.setBackgroundColor(Color.LTGRAY); tv.setTextColor(Color.BLACK);

    Read the article

  • How to change which item is “outlined” in a ListBox without changing the selection?

    - by Timwi
    How do you change which item is “outlined” in a ListBox? See the following screenshot for clarification: Background: I want to have a standard multi-select listbox that works normally. Unfortunately, the Windows Forms ListBox (with SelectionMode.MultiExtended) is not fully functional. The missing functionality is that it doesn’t let you select a disjoint set of items by using Ctrl+Arrow keys and Ctrl+Space. (Try it in Windows Explorer to see how it’s supposed to work.) I am trying to subclass ListBox and add this missing functionality. To this end, I intend to respond to Ctrl+Arrow keys in the OnKeyDown protected method, but in order to do so, I need to be able to move the outline without changing the set of selected items. How do I do that?

    Read the article

  • Use PHP to create a DOC file on a Unix Box based on an HTML webform selection

    - by Gerald Oakham
    Hello, I have an HTML file which contains a webform with multiple questions which have a YES / NO responses. If the question has a YES answer, I would like a predefined ( per question ) section of text to be written to a DOC file on the server, but only AFTER the submit button has been pressed ( this way, if the user changes their mind and changes an answer form YES to NO, I won't have to re-write the doc ). When the user has clicked Submit, The file should be presented as a download. Any Ideas

    Read the article

  • Chrome Extension: how to capture selected text and send to a web service

    - by phil swenson
    For the Google Chrome extension, I need to capture selected text in a web page and send to a web service. I'm stuck! First I tried a bookmarklet, but Chrome on Mac seems to have some bookmarklet bugs so I decided to write an extension. I use this code in my ext: function getSelText(){ var txt = 'nothing'; if (window.getSelection){ txt = "1" + window.getSelection(); } else if (document.getSelection) { txt = "2" + document.getSelection(); } else if (document.selection) { txt = "3" + document.selection.createRange().text; } else txt = "wtf"; return txt; } var selection = getSelText(); alert("selection = " + selection); When I click on my extension icon, I get a "1". So I think the act of selecting outside the browser window is causing the text to not be seen by the browser as "selected" any more. Just a theory.... thoughts?

    Read the article

  • DataGridView: how to make scrollbar in sync with current cell selection?

    - by David.Chu.ca
    I have a windows application with DataGridView as data presentation. Every 2 minutes, the grid will be refreshed with new data. In order to keep the scroll bar in sync with the new data added, I have to reset its ScrollBars: dbv.Rows.Clear(); // clear rows SCrollBars sc = dbv.ScrollBars; dbv.ScrollBars = ScrollBars.None; // continue to populate rows such as dbv.Rows.Add(obj); dbv.ScrollBars = sc; // restore the scroll bar setting back With above codes, the scroll bar reappears fine after data refresh. The problem is that the application requires to set certain cell as selected after the refresh: dbv.CurrentCell = dbv[0, selectedRowIndex]; With above code, the cell is selected; however, the scroll bar's position does not reflect the position of the selected cell's row position. When I try to move the scroll bar after the refresh, the grid will jump to the first row. It seems that the scroll bar position is set back to 0 after the reset. The code to set grid's CurrentCell does not cause the scroll bar to reposition to the correct place. There is no property or method to get or set scroll bar's value in DataGriadView, as far as I know. I also tried to set the selected row to the top: dbv.CurrentCell = dbv[0, selectedRowIndex]; dbv.FirstDisplayedScrollingRowIndex = selectedRowIndex; The row will be set to the top, but the scroll bar's position is still out of sync. Not sure if there is any way to make scroll bar's position in sync with the selected row which is set in code?

    Read the article

  • How to use jQuery to show/hide divs based on radio button selection?

    - by manoj382
    Hello, I have some radio buttons and I'd like to have different hidden divs show up based on which radio button is selected. Here's what the HTML looks like: <form name="form1" id="my_form" method="post" action=""> <div><label><input type="radio" name="group1" value="opt1">opt1</label></div> <div><label><input type="radio" name="group1" value="opt2">opt2</label></div> <div><label><input type="radio" name="group1" value="opt3">opt3</label></div> <input type="submit" value="Submit"> </form> .... <style type="text/css"> .desc { display: none; } </style> .... <div id="opt1" class="desc">lorem ipsum dolor</div> <div id="opt2" class="desc">consectetur adipisicing</div> <div id="opt3" class="desc">sed do eiusmod tempor</div> And here's my jQuery: $(document).ready(function(){ $("input[name$='group2']").click(function() { var test = $(this).val(); $("#"+test).show(); }); }); The reason I'm doing it that way is because my radio buttons and divs are being generated dynamically (the value of the radio button will always have a corresponding div). The code above works partially - the divs will show when the correct button is checked, but I need to add in some code to make the divs hide again once the button is unchecked. Thanks!

    Read the article

  • Eclipse plugin using actionset which will prompt a window for selection,how to do??

    - by Rahul
    *In eclipse plugin using actionSet *Here blue icon for some code(using actionset) ,when i click on that it should prompt a window(some popup) which contains two or more link like web links, when i click 1st link it should perform the 1st action and window should disappear so on...Can anyone help me in this how to do that???* See the picture below for reference ..like this with ok button ok should perform the selected action plz help me to do this...??

    Read the article

  • How to set initial checked values of rich tree leaf node.

    - by Ajay99
    Hi, How to set the initial the leaf node values. -----------------------Stations.xml AAAAAAAAAAAA BBBBBBBBBBBB CCCCCCCCCC DDDDDDDDDDDD EEEEEEEEEEEEEE Hall Oates - Kiss On My List David Bowie - Let's Dance Lyn Collins - Think (About It) Kim Carnes - Bette Davis Eyes KC the Sunshine Band - Give It Up //inital check values --------------------Libray.java---------------- public class Library { private TreeNode treeData; private List menus=null; public Library()throws Exception { menus=new ArrayList(); //it's initial selection of the check box vardata.attributes.selection("---key1---); vardata.attributes.selection("---key2---); vardata.attributes.selection("---keyn---); yoursuggestedcode.attribute.selection("key"); //I need your suggestion code. FacesContext context = FacesContext.getCurrentInstance(); treeData = XmlTreeDataBuilder.build(new InputSource(getClass().getResourceAsStream("/Stations.xml"))); } public TreeNode getTreeData() { return treeData; } public void setTreeData(TreeNode treeData) { this.treeData = treeData; } public List getMenus() { return menus; } public void setMenus(List menus) { this.menus = menus; }

    Read the article

  • Changing background image of a Drupal page based on user's selection...?

    - by Sambo
    Hi I'm trying to give my users the functionality to change what the background image used on a page is. The list of background images will be a small number that won't really change. I thought I could add a few Taxonomy terms...one for each background type...then apply a class to the body tag when the page is viewed. Does this sound feasible and if so how would I go about doing it? Thanks Sam

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >