selection

How to set Color for selected Text in java? [closed]

和自甴很熟 提交于 2019-12-26 09:20:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Please any one help for set the color for selected text only... I has Create a Simple Text Editor... But, I can't set the color for selected text contents... once ,I has select the color it will affect the whole text area instead of selected area. Please Help Any One, Thanks in Advance. for Example : Now I

Restrict selectable image area with imgAreaSelect

大城市里の小女人 提交于 2019-12-25 14:25:09
问题 Using imgAreaSelect, I'd like to restrict the area that is being selected directly while selecting. The reason behind that is that I display a graph and the image includes the legend and the axis. I want to select only the graph area to later reload the graph zoomed on that area. So when the user is selecting an area on the image, the selection should not go outside certain bounds. Is this possible? Thanks! 回答1: The documentation tells me that you can set the coordinates of the selection area

Also select parents up to the root when selecting child in TreeTableView

北城以北 提交于 2019-12-25 11:57:15
问题 We try to achieve the following: When a node gets selected in a JavaFX TreeTableView , also "the path to the root", i.e., the parent, the grandparent, and so on should get selected. Selected in this case means highlighted with a different background color , see the image (in the example, the node on Level 2 has been clicked by the user). Is there a built-in function how to achieve this? We tried using CSS but did not succeed. 回答1: There's no "built-in function" to do this. Use a row factory

Also select parents up to the root when selecting child in TreeTableView

旧城冷巷雨未停 提交于 2019-12-25 11:56:07
问题 We try to achieve the following: When a node gets selected in a JavaFX TreeTableView , also "the path to the root", i.e., the parent, the grandparent, and so on should get selected. Selected in this case means highlighted with a different background color , see the image (in the example, the node on Level 2 has been clicked by the user). Is there a built-in function how to achieve this? We tried using CSS but did not succeed. 回答1: There's no "built-in function" to do this. Use a row factory

Enabling/Disabling Toolbar-Command based on selection in ViewPart, not Perspective

≡放荡痞女 提交于 2019-12-25 11:14:12
问题 I have a perspective consisting of multiple ViewPart s. One of these ViewPart s has a command assigned using a menuContribution with locationURI="toolbar:..." . The ViewPart with the Toolbar-Command only contains one Child (a TreeView ) and does this.getSite().setSelectionProvider(child) in it's createPartControl(Composite) -Method. The problem is, that when i click one of the other ViewPart s in my Perspective the Command gets disabled, but the selection does resist in the TreeView

Enabling/Disabling Toolbar-Command based on selection in ViewPart, not Perspective

不羁的心 提交于 2019-12-25 11:10:00
问题 I have a perspective consisting of multiple ViewPart s. One of these ViewPart s has a command assigned using a menuContribution with locationURI="toolbar:..." . The ViewPart with the Toolbar-Command only contains one Child (a TreeView ) and does this.getSite().setSelectionProvider(child) in it's createPartControl(Composite) -Method. The problem is, that when i click one of the other ViewPart s in my Perspective the Command gets disabled, but the selection does resist in the TreeView

how to get the correct index in a datGrid when I use the MVVM pattern and I have a filter in the dataGrid?

泪湿孤枕 提交于 2019-12-25 10:58:07
问题 I have a DataGrid in my view, and I would like to select a row. In my view model I have a property to bind the SelectedIndex of the dataGrid. When I add a new row to the dataGrid, this element is add at the end of the elements, show in the dataGrid I can see it in the last position. However, if i have shorted the elements in the dataGrid because I click in a column name and this filter makes that the new element it will be in the first position of the dataGrid, then I select the incorrect

Weird behavour wysiwyg?

安稳与你 提交于 2019-12-25 10:16:09
问题 I have a code to wrap elements around text it works fine until i try the following format in my editor: <u><strong>T</strong>es<strong>t</strong></u> It automatic adds two empty strong elements before the underlined element and after like this: <strong></strong> <u><strong>T</strong>es<strong>t</strong></u> <strong></strong> Here's the code that i use and i have buttons that have actions like wrap('strong'): function wrap(tagName) { var selection; var elements = []; var ranges = []; var

Hide the cell selection box in Excel

给你一囗甜甜゛ 提交于 2019-12-25 09:27:42
问题 I was wondering if there was any way to hide which cell you have selected within excel (for presentation purposes). I want the cursor itself (to navigate), but I want the box that highlights which cell i am clicking on invisible if possible. Thanks! 回答1: If you're using a button object on your worksheet, it shouldn't highlight any cell. If you're using a cell as a "button", your best bet would be to hide and not use column A on your worksheet and then create a module: Private Sub Worksheet

Selection property not working

99封情书 提交于 2019-12-25 07:29:11
问题 string holder = richTextBox1.Selection.Text; The .Selection produces an error : 'System.Windows.Forms.RichTextBox' does not contain a definition for 'Selection' and no extension method 'Selection' accepting a first argument of type 'System.Windows.Forms.RichTextBox' could be found (are you missing a using directive or an assembly reference?). 回答1: A RichtTextBox doesn't have a Selection property, hence the error message. It does have a SelectionStart and SelectionLength property, which you