Questions tagged [highlight]

is for questions involving the highlighting of text or other visual elements.

Highlighting is usually a color-background change that emphasizes text, but it could be other ways of emphasizing any visual element.

2914 questions
12
votes
2 answers

How to highlight selected item in ItemsControl?

I have the following XAML. How can i highlight the selected item in the ItemsControl ? I can override the selected item template for ListView but how to achieve the same for ItemsControl? Is there any alternative control that can display a…
Lucifer
  • 2,317
  • 9
  • 43
  • 67
12
votes
6 answers

Change CSS of selected text using Javascript

I'm trying to make a JavaScript bookmarklet that will act as a highlighter, changing the background of selected text on a webpage to yellow when the bookmarklet is pressed. I'm using the following code to get the selected text, and it works fine,…
Chris Armstrong
  • 3,585
  • 12
  • 42
  • 47
12
votes
7 answers

How to set background color for a row based on current date in Google Docs Spreadsheet?

I have a Google Docs SpreadSheet, where in the column A are dates (A1: 2013-11-22, A2: 2013-11-23, A3: 2013-11-24 etc). I would like to automatically highlight - set a background color for a row, where in the column A is today's date. To have every…
machj
  • 341
  • 1
  • 3
  • 8
12
votes
3 answers

Highlight (shade) plot background in specific time range

On a generic plot, with time on the x-axis, I would like to highlight a period of some specific years. How can I bestly do this? My idea is for example a light yellow bar for the highlighted years, behind the plot of course. The plot code I have…
Peter Smit
  • 27,696
  • 33
  • 111
  • 170
12
votes
6 answers

Highlight all searched words

In my RichtextBox, if I have written as below. This is my pen, his pen is beautiful. Now I search word "is" then output would be as below. All "is" should be highlighted.
Khilen Maniyar
  • 2,519
  • 7
  • 31
  • 35
12
votes
5 answers

Mouseover event doesn't granulate on IE9 for sub elements, event doesn't start on IE8

We were adapting a method posted here highlight a DOM element on mouse over, like inspect does to NOT use jQuery. We came up with this solution so far: http://jsfiddle.net/pentium10/Q7ZQV/3/ This seams to work on Chrome and Firefox, but doesn't work…
Pentium10
  • 204,586
  • 122
  • 423
  • 502
11
votes
1 answer

Highlight text based on index in textContent

Bounty The bounty will go to the fastest solution, as demonstrated by jsPerf, across the latest release versions of Firefox, Chrome and Internet Explorer at time of testing or the answer most useful in creating such a solution at my discretion.…
wizzwizz4
  • 6,140
  • 2
  • 26
  • 62
11
votes
6 answers

Wordpress custom post type hierarchy and menu highlighting (current_page_parent)

I have created a custom post type of 'portfolio' and page with a template that retrieves all posts matching that custom post type. The problem is when I drill down into the actual post, the post seems to sit under 'blog' in the main menu…
Craig
  • 972
  • 3
  • 13
  • 38
11
votes
1 answer

leafletjs : Highlight polyline on mouseover

I have an array of polylines that displayed on a map, now what I am aiming to do is, when I hover over a certain polyline from the list, only that polyline highlights (or changes color). What I have right now is something like this (this code is…
rac3b3nn0n
  • 861
  • 2
  • 12
  • 26
11
votes
4 answers

How to disable selection highlighting in a QTableWidget?

I have a QTableWidget with a disabled setSelectionMode (QTableWidget::NoSelection) and the QTableWidgetItems I fill in don't have the Qt::ItemIsEditable flag. Nevertheless, a cell that has been clicked gets some kind of cursor (the black line at the…
Tobias Leupold
  • 1,512
  • 1
  • 16
  • 41
11
votes
4 answers

Vim variable syntax highlighting

I'd like to change my vim config file to allow highlighting of only my declared variables, not keywords. This article shows and explains what I mean: Alternate syntax highlighting I'm a beginner to vim (I've never changed the default config…
11
votes
1 answer

Can I get highlighted text with JQuery?

I'm not finding anything anywhere. Is there a JQuery solution to retrieve highlighted text? I need to check the highlighted text for spans, get those spans' style attributes, and manipulate them based on that. I can do that part with regular…
Mr. Lavalamp
  • 1,860
  • 4
  • 17
  • 29
11
votes
3 answers

Vim Markdown highlighting (list items and code block conflicts)

I decide to learn more about vim and its syntax highlighting. Using examples for others, I am creating my own syntax file for Markdown. I have seen mkd.vim and it has this problem too. My issue is between list items and code block highlighting. Code…
Tao Zhyn
  • 1,736
  • 2
  • 16
  • 16
11
votes
3 answers

Change highlighting color of auto-highlighted variable names in netbeans?

When I move over a class name all the other places that that class name shows up are highlighted. When I hover over a variable it does the same thing with different places that I have used that variable. I cannot find where to change that setting…
Joshua Harris
  • 283
  • 1
  • 2
  • 9
11
votes
2 answers

Android: set list view item as "selected" (highlighted)

In my application I want to do something similar to gmail app on tablets, in the left to have the list of items and in the right to have a fragment with the content of that item, like for gmail app this content is being downloaded after selection.…
Ciprian
  • 2,879
  • 3
  • 28
  • 28