Change color for highlight words

I'm using the highlight words column attribute for a report with a search parameter. I was wondering if there is a way to change the color of the text that is highlighted? The html that is generated wraps the highlighted word with <span style="font-weight: bold; color: red;">search string</span>

sql functions like INSTR, SUBSTR, and DECODE are good for this...
select decode(instr(upper(emp.ename),upper(:P1_SEARCH)),
0, emp.ename,
substr(emp.ename,1,
instr(upper(emp.ename),upper(:P1_SEARCH)) - 1)
|| '<span style="color:blue;">' ||
substr(emp.ename, instr(upper(emp.ename),upper(:P1_SEARCH)),
length (:P1_SEARCH))
|| '</span>' ||
substr(emp.ename, instr(upper(emp.ename),upper(:P1_SEARCH)) + length(:P1_SEARCH) )) my_column_alias
from emp;
...hope this helps,
raj

Similar Messages

  • How to change the color for HTML words in JEditorPane?

    Hi Sir,
    In the JTextPane , we could change the word's color by using:
    Style style = doc.addStyle("test",null);
    StyleConstants.setForeground(style, Color.red);
    doc.setCharacterAttributes(10,20,syle,true);
    we can change the text into red color,which range is from 10 to 30.
    But how to change the color for HTML words in JEditorPane?

    Hi,
    you can use an AttributeSet to apply the foreground color. Let's say, doc is a HTMLDocument, then SimpleAttributeSet set = new SimpleAttributeSet();
    doc.getStyleSheet().addCSSAttribute(set, CSS.Attribute.COLOR, "#0D0D0D"); would apply a color to a given AttributeSet. The AttributeSet with your color then can be applied to a selected range of text in a JEditorPane by   /**
       * set the attributes for a given editor. If a range of
       * text is selected, the attributes are applied to the selection.
       * If nothing is selected, the input attributes of the given
       * editor are set thus applying the given attributes to future
       * inputs.
       * @param editor  the editor pane to apply the attributes to
       * @param a  the set of attributes to apply
      public void applyAttributes(JEditorPane editor, AttributeSet a) {
        ((HTMLDocument) editor.getDocument()).getStyleSheet().addCSSAttribute(set, CSS.Attribute.COLOR, "#0D0D0D");
        editor.requestFocus();
        int start = editor.getSelectionStart();
        int end = editor.getSelectionEnd();
        if(end != start) {
          doc.setCharacterAttributes(start, end - start, a, false);
        else {
          MutableAttributeSet inputAttributes =
            ((SHTMLEditorKit) editor.getEditorKit()).getInputAttributes();
          inputAttributes.addAttributes(a);
      } Ulrich

  • How to create a "Custom Color" for highlighting? (Acrobat XI)

    March 10, 2014
    How to create a "Custom Color" for highlighting? (Acrobat XI)
    The numbers in the RGB and other fields change as various numbers are changed.
    I wanted to create a pale orange:
    Hue               13      Red      255
    Saturation   240      Green  177
    Luminosity    86       Blue     140
    I'd selected one of the orange squares in the color grid, to display the general orange area of the slider.
    I moved the slider to select a pale orange, which generated the above numbers.   Since this wasn't directly available to save to a Custom Color, I tried to  edit the numbers.  Unfortunately, the other numbers changed, making it impossible to actually create a color.
    Any suggestions would be appreciated.
    Note:  I used Techsmith's Snagit to show screen shots in a Word document.
    When I attempted to browse and upload the file, the error message said "[The content type of this image is not allowed.]"
    OK...what images *are* allowed?

    Hi Don,
    I saw Gilad answered your question in another forum post.
    Do you have everything you need at this point?
    Let me know if you need further assistance.
    Kind regards, Stacy

  • Change color for

    I need to make links from keywords in PDF to files which is stored on harddisk.
    As for now I've done following
    1. Searched PDDoc with WordFinder for keyword
    2. Created link annotations from keyword quads
    3. Make filespecification and set it as launch action for all link annotations
    Now I need to change color for recognized keyword below link annotation. Could anybody help me with any hint?
    Thanks in advance.

    Look at the PDEdit APIs - that's what handles content.

  • S:TextArea How change color for some chars in text?

    I have s:TextArea and i need in runtime change color for some chars displayed in text.
    How i must to do this correctly?

    pcardinale wrote:
    Initially, a control has no caption.  It's not just that the caption string is empty and the caption not visible, but the caption object does not exist.
    I think this should probably be changed in future versions, because even if each control had a caption, it would still be a negligible small part of the VI. The current behavior made sense many years ago where HD and memory space was very precious. Not any more!
    This issue comes up often enough that it warrants addressing the root of the problem.
    It is hard to convince the casual that the caption does not exist if he can simply do a "show caption" at edit time and it will show in all glory, even with the default set to the current label. It is confusing!
    There is even an idea about this that seems worth supporting (also read the link in the discussion).
    What do you think?
    LabVIEW Champion . Do more with less code and in less time .

  • Is theere an app I can download that will let my LED light change colors for like when it alerts u fora call or message?

    Is there an app I can download that will let my LED light change colors for like when it alerts u for a call or message?

    On the iPhone 4, the LED cannot change color.

  • IOS 7: Will there be updates to change colors for the Notes

    iOS 7: Will there be updates to change colors for the Notes & Text msgs? The white background washes out the text.

    Nobody here has any knowledge of what Apple may or may not include in future updates.
    You can send feedback to Apple about your wishes though - http://www.apple.com/feedback/

  • Can i change colors for events in the calendar?

    Can I change colors for different events in Calendars on Ipad 2?

    Philly - I always respect your opinion and what you have to say but please hear me out.
    Philly_Phan wrote:
    I see one iCal window and that makes me conclude that I have one calendar with multiple event types.
    You understand how the app works and how to create calendars. As I pointed out - I explained to one user that you have to tap the Calendar button in the upper left corner and then select the calendars that you want to view. In fact, if you have accidentally tapped Hide All Calendars - you see no events.
    I totally understand what you are saying and I rarely take an argumentative approach in this forum, but what I am trying to point out to the OP is that you cannot create different colors for "events" in one single calendar.
    For instance, if you have one calendar called "Home" and that is the one calendar that you use - if Billy has a soccer game at 6:00 PM, Jessica has band practice at 7:00 PM and you have a bridge club meeting (I'm stuck for another idea at the moment ) at 7:30 PM - and you want all of these "Events" to appear in different colors within the same calendar - it cannot be done.
    Sometimes I think this is what users want to do - differentiate the different "Events" within a single calendar - and that cannot be done - at least AFAIK.
    I didn't mean to cause confusion nor was I trying to complicate things. I just thought that I was giving a complete answer as to how the feature works.
    After all - I could have just used the "please get the iPAD user guide" line.  I just love that response.

  • PShop 5.5 - using text tool, can't change color of one word...

    Hi All,
    I'm using the text tool and want to change the color of one word but when I select that word and click on the Color Picker box then select the color I want, the entire text changes to that color. I can't figure out what I'm doing wrong.
    I've got several paragraphs and want all the text except the one word to be black. This page is Layer 2 and has the 'T' next to it in the Layers palette.
    Cany ideas?
    Thanks,
    Nancy

    Bless your heart for being patient with XD. I've had a rather frustrating 'technology day' with my husband's laptop (using Vista) and uploading photos but I figured that out. On top of that, my sister had a few changes to make to her website and - unfortunately - most of the pages with loads of text are done with PhotoShop then converted to .jpg's. I know...I know. I'm trying to find the time to change those pages in DreamWeaver to table format instead of layer format...long story.
    All that to say - thank you so much and I love your 'dag nabbit'...that's my kind of talk. I'm grateful for your help and it's ended my day on a better note! ;-)
    Sounds like you're a teacher? Maybe you'll have advice for me with DreamWeaver.... ?
    Thanks again,
    Nancy

  • Changing color for data in sql developer

    I have recently seen some one have modified the setting in SQL developer to show certain color for the cells that have null values. Couldn't find where to set that property. Does anyone know how to default a color for a cell with null values in SQL developer?
    -app

    Go to Tools|Preferences|Database|Advanced. There is an option to set the null value background color.
    Ashley
    SQL Developer Team

  • URGENT - Change color for a set of rows in JTable

    Hello all,
    How can i set color for a particular set of row which are all having same values in a cell. If any other rows contains same value that should also be in different color.
    Example:
    I have 10 rows containing itemcode and taxes in JTable.
    1st, 2nd and 4 th row contains same value of Taxes -- It should be in a set of color. red
    6th and 8th row containing same value of Taxes -- it should be in a set of color blue
    other are in normal color. Kindly send the coding for the above. Advance thanks.
    Regards,
    N.A. Ramasubramani / Chennai.

    Hi,
    Here is how I do it... create a Vector of Vector or an array[row][col] containing colors for every cell (row,col). Create a custom Cell renderer in which you pass the color data variable. Then in the renderer you get the Row and Col and set the appropriated color for the background.
    JRG

  • Change color for link/website/file link.

    Everytime I create a like to an email or file it seems to be WHITE FONT, but that doesn't work on white background. I have tried so many ways to change the font, but it won't allow it. What do I do to change the color of font to a hyperlink/file etc?
    Thanks

    When the Site is published to your folder/.Mac/iDisk, there is a corresponding CSS style sheet for every page type. For example, the Blog folder has within it, a Blog CSS style sheet. Using a CSS editor (like CSSEdit) you can adjust things like the hyperlink and hover color as well as font etc. The only aspect of the iWeb template I have not been able to adjust is the Navigation bar.

  • How to change colors for record working time calendar

    Hi,
    I would like to change the colors in the calendar displayed in record working time based on some conditions.
    How do i do that is there any BADI associated with that
    Thanks
    Bala Duvvuri

    Hi Bala ,
    Yes its possible to change that .
    You need to implement BADI for this ..
    BADI name : "PT_ABS_REQ"
    In the BADI "PT_ABS_REQ"   interface "IF_EX_PT_ABS_REQ" you can find the method
    "SET_CALENDAR_COLOR" in that you can set the colure for the Absent type ......
    Adjust Colors of Calendar and Team Calendar
    Functionality
    You can use this method to change the colors in the team calendar.
    In the standard system, the different statuses for requests have different colors. You can use this method to differentiate the colors of requests depending on the following aspects:
    Status of requests (status)
    Action that an employee has executed: new request, delete, change (UIA operation)
    Subtype of absence (SUBTY)
    Full-day or partial-day absence (BEGMT, where BEGMT = 0 signifies a full-day absence)
    Application mode ( mode). You specify the application mode in the Select Employees for the Team Calendar IMG activity.
    Color Display of Status of Leave Requests(COLORS_ACTIVE). You specify this status in the Specify How Leave Is Displayed and Default Values IMG activity.
    Available Colors
    You have a choice of 16 colors. The 16 colors are hard coded, that is, you cannot change them or add other ones.
    The available colors are stored with their RGB value as constants of the CL_PT_REQ_CONST class. Use these constants if you want to change the colors.
    Notes
    If you change the colors in the team calendar, you should also adapt the legend accordingly. You can use the Adjust Legend for Calendar and Team Calendar method to do so.
    Hope this work!!!

  • Change color for trim and registration mark

    The trim and registration marks are having the color name "All" in the generated pdf from InDesign. Any one help me out on how to change the color to K (black) while generating PDF out of InDesign.

    JohnAD77 wrote:
    Is it possible to make to 4/c to 1/c (black 100%) while generating PDF itself without adding marks in the document?
    Maybe, in CS6, by exporting to Grayscale, but this will make everything black ink only. Otherwise, no.
    To add your own marks, add a slug area to the file, draw whatever you want for marks in that area, using [Black], and turn off automatic marks in the export dialog, but Include Slug Area under the bleed settings.

  • Change Color For HBox  in Sapui5

    Hi all,
    How the change the background color of HBox dynamically (Red,Green) depending on Status(0,1).
    Please Help me on this.
    Thanks
    Sathish

    Hi Dennis,
    In the above image i have used an hbox and i added that hbox to an rowrepeater.
    Now u can see an button in the HBox for which i have binded the text using an switch case if my status = 0 then the text shoukd be Allocate venue and if status = 1 then the text should be view venue.
    I have done upto this.
    Now the requirement is for the Records having Button text as Allocate then the entire row should be in red color and if text is view venue then that entire row should b in green color.
    How can i do this.
    Thanks
    Sathish

Maybe you are looking for