selection

How to enable cursor selector in GWT TextArea?

半城伤御伤魂 提交于 2019-12-12 02:31:17
问题 In my application I call an API to get the contents of the file as a String and use the TextArea UIWidget to display the file content to the user. I want the user to be able to select the text in the text area in order to be able to copy and paste the contents of the file. When I hover over the TextArea in GWT, text selection is not being enabled. The getCursorPos function in the TextArea seems to be useful when modifying the textarea but not for selections 回答1: Text selection is enabled in

how to select rows on cellclick, and also columns on column header click?

旧街凉风 提交于 2019-12-12 01:51:42
问题 Hello I want to select the column via columnheader click, and also select the row via cell click. This code doesnt do the job. Private Sub datagridview2_ColumnHeaderMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles datagridview2.ColumnHeaderMouseClick datagridview2.Columns(e.ColumnIndex).Selected = True End Sub these gridview options I made in the code For Each c As DataGridViewColumn In datagridview2.Columns c.SortMode = DataGridViewColumnSortMode.NotSortable c

How to prevent selection of SeparatorList.Separator in a JList?

荒凉一梦 提交于 2019-12-12 01:51:41
问题 I have created a JList using GrazedLists, specifically an EventList which I then pass into a SeparatorList with a custom Comparator that sorts my EventList elements. I am using a DefaultEventListModel as the JList model, passing in my SeparatorList. And I am using a custom CellRenderer to decorate the SeparatorList.Separator cells. All is displaying nicely, I see a nicely formatted list grouped as I like, similar to optgroups in HTML SELECT elements. Now I would like to prevent selection of

Can you emulate the left-mouse button selection in JQuery?

非 Y 不嫁゛ 提交于 2019-12-12 00:47:11
问题 I have a large number of DIVs aligned like this: +---------------+ | DIV 1 | +---------------+ | DIV 2 | +---------------+ | DIV 3 | +---------------+ | ... | I want to change to toggle the class of each DIV when the user holds the left mouse button and hovers over them. isMouseDown = false $('body').mousedown(function () { isMouseDown = true; }) .mouseup(function () { isMouseDown = false; }); $(".div").live("mouseenter", function () { if (isMouseDown) { $(this).toggleClass("selected"); } });

PHP/GD, how to copy a circle from one image to another?

别来无恙 提交于 2019-12-12 00:26:19
问题 Is there a reasonably straightforward way to copy a circular area from one image resource to another? Something like imagecopymerge except with circles or ovals etc? If possible, I want to avoid having to use pre-created image files (any oval shape should be possible), and if there's transparency colours involved they should naturally leave the rest of the image alone. Reason I'm asking, I have a few classes that allow to apply image operations inside a "selected area" of an image, which

Flex/FlashBuilder :: Spark List / IconItemRenderer:: Disable Selection Highlight / No Selection / Remove Selection

情到浓时终转凉″ 提交于 2019-12-12 00:05:22
问题 I had trouble removing the selected and down state colors for a spark list using IconItemRender. If you are making a mobile app and using IconItemRender (instead of ItemRenderer) there is no autoDrawBackground property. I figured I'd drop it in here after figuring it out thanks to this page: http://www.sajeevkumar.com/2012/01/08/flex-4-6-list-mobile-iconitemrenderer-background-image/ 回答1: You can do the following to muck around with the down and selected colors. For more control over items in

vba search through a folder and select files by name

血红的双手。 提交于 2019-12-11 19:58:53
问题 I've got lots of files in a folder structered with names like: "prof102122013@10.18.41.csv" where the "02122013" bit is the date - 02/12/2013. Some of them have been made on the same day. I'd like to create a file that takes all of the workbooks that were made on the same day and put them all in one big file. So far I am struggling to get the selectivity to open a day-specific file. Does anyone have any idea what kind of code can help me with this? Edit: Solved, thanks for the help, all! Here

Populating dropdown with query results in PHP

时间秒杀一切 提交于 2019-12-11 19:33:38
问题 The code should open all the rows of gamename column of games table and put 1700 rows into drop down menu, but it only displays a blank dropdown with 1700 rows. // Connect to server and select database. mysql_connect("$host", "$username", "$password") or die(mysql_error()); mysql_select_db("$db_name") or die(mysql_error()); $i=0; $result = mysql_query("SELECT gamename FROM games"); $storeArray = Array(); echo '<select name="game" style="width: 400px">'; while ($row = mysql_fetch_array($result

Why Rangy library doesn't work with contenteditable in Opera?

只谈情不闲聊 提交于 2019-12-11 18:49:12
问题 I am using popular Rangy library inside contenteditable DIV. My code is pretty simple: var saved_selection = false; $('#contenteditable').bind('keypress mouseup', function(e){ $(this).find('.rangySelectionBoundary').remove(); saved_selection = rangy.saveSelection(); });​ Now this works pretty good in Chrome and FF. However, in Opera it behaves very strangely, because it doesn't allow to insert any characters in contenteditable and it rather looses focus, or at least it seems so. I have

Opengl Selection with Alpha Test

依然范特西╮ 提交于 2019-12-11 15:57:42
问题 From what I've been seeing around the internet, this problem can't really be solved with my approach. I am currently writing a program that uses a selection buffer pass over all the objects in the scene. However, one of the objects is a texture in which a large part of it has alpha 0. It works fine when rendering, the alpha values are not displayed, but when in selection mode, the alpha test is skipped, and hovering the mouse over the transparent areas selects the object instead of whatever