Preserve foreground color of selected text

Hello,
I got text like this in a StyledText-Field:
one two three
If this text is selected in Windows, the text color within the selection will be changed to white.
In OS X the text will keep its color even under selection.
Is it possible to have such a behavior in Windows too?

I have the same problem.
I've generated a form from designer and i put a template object to a item. This template has a visual attribute to red color on foreground, but when i set the visible property true, the foreground color changes.
I put the code on the same way that you, but i've the same problem. Even, i put the inverse order to code and the same.
My forms version is 10gR2 with patch set 2 applied.
Any idea?? Thank you

Similar Messages

  • Blue color for selected text

    Hello, is any way to change blue color for selected text which is the same as for invisible characters? When I select text all unvisible characters are realy unvisible... In old ID selected text was black and invisible characters inside was orange. Many thx for help... Ilja

    For sure I tried to use "select text" in Illustrator CC on the same system (windows 7) and selected text is black too...
    Many thx for help
    Ilja
    PS
    I must agree with the post about very slowly ID CC. I tried the same indd files in CS6 and CC and CC is slowly in large documents (500 pages and more), for ex. find/replace, but when document is near its end (aprox 80-100 pages) ID CC is much faster than at the start of document. Now I am working on large doc (540 pages) with many headers (aprox 3-4 on each page) and when I want change space for non-breaking space on pages between 1-100, this takes sometimes more than 2 seconds!!! Only simple space change - no styl change etc.
    I think that I am using fast PC (Intel i7, 16GB RAM, SSD disks - cache is on separated mSATA 30GB SSD), all doc are located inside PC, no external drives for normal day work) and I never seen these lags on CS6. Doesn't matter if I using ID CC 32 od 64 bit - it is aprox the same.

  • Can you change the color of selected text in word?

    I use Word 2010, and when I select text it is always blue, is there a way to change the color?

    I use Word 2010, and when I select text it is always blue, is there a way to change the color?
    My earlier posting was an error.
    I apologize.
    You seem to be saying that the default colour for text is blue.
    You need to change:-
    Normal.dotm
     - to change the default colour of text.
    In order to change the default colour of text take the following steps (that were tested on Windows 7 and Office 2007 - the process should be
    similar, if not identical, for yourself):-
    1. Open a new blank document (this should
    have the default text as blue).
    Save that document with a new name for example:-
    c:\word\testing_aug_25_2014_2
    2. In the above document:-
    Insert tab
    Text group
    Click on the drop down arrow to the lower right of:-
    Quick Parts
     - then click on:-
    Field . . .
    The:-
    Field
     - window should open.
    3. In the:-
    Field
     - window in the field called:-
    Field names:
     - scroll down to:-
    Template
     - and click on that option so that it's highlighted in blue.
    Now, towards the top right hand corner of the same window, click in the box called:-
    Add path to file name
     - so that it has a tick (check mark) in that box.
    Click:-
    OK
    The file name of the template should now be inserted into your document.
    On my machine this was:-
    C:\Users\user_name\AppData\Roaming\Microsoft\Templates\Normal.dotm
    The above path might be different for you.
    4. I saved my document at this point.
    5. Now open the file called:-
    C:\Users\user_name\AppData\Roaming\Microsoft\Templates\Normal.dotm
    A document should open on your screen (still with blue text) and with:-
    Normal.dotm
    - in the middle of the Title Bar at the top of the screen.
    Highlight all of the text in the document so that it's (for example) black.
    Save the file.
    6. Close all open documents in WORD and
    close WORD itself.
    7. Now open a new document and its default
    text should be set to the colour that you applied at step 5. above (I used black at that point).
    Does that resolve your problem?

  • How to set selected text color in Spark TextInput

    I'm trying to make Spark TextInputs and MXFTETextInputs look like Halo/MX TextInputs as much as possible, since I have a mix of both Spark and MX TextInputs in my application. I know I can set the
    selection background color to black using focusedTextSelectionColor. How can I set the selected text color to white so it matches the MX white-on-black look?

    This works, if you set the enabled property directly on the s:TextInput:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx">
        <s:layout>
            <s:VerticalLayout horizontalAlign="center" verticalAlign="middle" />
        </s:layout>
        <s:controlBarContent>
            <s:CheckBox id="ch" label="enabled" selected="true" />
        </s:controlBarContent>
        <fx:Style>
            @namespace s "library://ns.adobe.com/flex/spark";
            @namespace mx "library://ns.adobe.com/flex/mx";
            s|TextInput:disabled {
                color: red;
        </fx:Style>
        <s:Group>
            <s:TextInput id="ti" text="The quick brown fox jumps over the lazy dog" enabled="{ch.selected}" />
        </s:Group>
    </s:Application>
    It can get a bit trickier when you're setting the enabled property on a parent container, since (I believe) that the child control's enabled properties are still set to true and just the container is disabled. One possible workaround would be to bind the child TextInput control's enabled property to the container's enabled property. That way the s:TextInput should still go to it's disabled state and you can customize the disabled state's styles to have darker text, or whatever else you want.
    <s:Group id="gr" enabled="{ch.selected}">
        <s:TextInput id="ti" text="The quick brown fox jumps over the lazy dog" enabled="{gr.enabled}" />
    </s:Group>
    Peter

  • Selection Color of a text box

    As one of the project requirements, I have to provide a
    functionality in my application to be able to change the selection
    color of the text box. Having no provision in Flash, I searched on
    the net and found one good example of doing that with
    flash.geom.ColorTransform and TextFormat classes. It works fine
    with windows. However, it doesn't work on Mac OSX. I am using Flash
    8 with AS 2.0 for development.
    I am seeking some support from all the brilliant developers
    here. Can somebody help me with a solution to this problem?

    Create 4 radio buttons, all called the same name, but with export values of cent.grn, cent.amb, cent.red, cent.blk.
    Then use this as the custom calculation script for the text field:
    var v = this.getField("myRadioButtons").value;    //Replace myRadioButtons with the name of your radio button group
    if (v=="cent.grn"){
    this.getField("tf.assmnt.stat").fillColor = color.green;    
    else if (v=="cent.amb"){
    this.getField("tf.assmnt.stat").fillColor = [ "RGB", 1,.5,0 ];
    else if (v=="cent.red"){
    this.getField("tf.assmnt.stat").fillColor = color.red;
    else if (v=="cent.blk"){
    this.getField("tf.assmnt.stat").fillColor = color.black;

  • Error in selected text background color

    Here example.
    The selected text in white is really not good visible selected.
    Why flash does not suppor that?
    http://lionhead.nl/voorbeelden/flash_selected_text_error/Flash%20text%20error.html
    How come there is nowhere to set anything to make this work properly. Like in html does this automatic?
    Adobe is this a bug or not help for this?
    Regards,
    Michiel

    hii
    textPane.setSelectionColor(Color.YELLOW);
    its not work.bcz i want to highlight the selected text with color of my choice n if i select different text to highlight with different color then previous selected text should remain highlighted ...

  • Selective replace foreground-color with background-color

    Hi,
    I'm new to Photoshop and coming from paint shop pro (psp).
    Now I have to recolor a black dotted arrow in a bitmap to red.
    All other contents are black, too. In psp there is a tool/brush to
    replace foreground-color with background-color. So I'd select
    black as foreground-color and red as background-color, hover
    with cursor over the area to recolor and that's it.
    How to do it with Photoshop?
    Thanks in advance
    Jörg

    softmonauts wrote:
    Now I have to recolor a black dotted arrow in a bitmap to red.
    All other contents are black, too.
    Can you clarify this?  It sounds like you have a black arrow on a black background.

  • What controls the color of the cursor that selects text when you use the "Edit Document Text" tool?

    Hi, I have had a student ask me a question I cannot answer: what controls the color of the cursor that selects text when you use the "Edit Document Text" tool?
    I have only seen it appear as a black semicircle over each letter, but at a different computer in our training facility, this same tool appears as an aqua-green highlight.
    Is it a preference I never noticed? Thanks for any info.

    What version of Acrobat? What operating system?

  • Changed the color of the selected text

    I changed the color of the selected text in Photoshop CS6, from black (background) & white (text) to different colors. I want to know how I did it.

    Selecting tends to invert the text. Use Ctrl/Cmd h while in Text edit mode to hide the selection.

  • TextArea selected text color change

    Hi
         I would like to know, how to change the text color of the selected text from textarea.

    Formatting Text
    with a textfield "tf" on your stage:
    import flash.text.TextFormat;
    var startIndex:int = 0;
    var endIndex:int = 0;
    var defaultFormat:TextFormat = new TextFormat();
    defaultFormat.color = 0x000000;
    var highLightFormat:TextFormat = new TextFormat();
    highLightFormat.color = 0xFF0000;
    tf.addEventListener(MouseEvent.CLICK, selectText);
    function selectText(event:MouseEvent):void
        startIndex = tf.selectionBeginIndex;
        endIndex = tf.selectionEndIndex;
        trace(startIndex+"..."+endIndex);
        //highLights the current selection
        tf.setTextFormat(highLightFormat, startIndex, endIndex);

  • InDesign CC selected text color

    I've just started using INDD CC and am having a problem. When I select text in my document the background color is a dark blue (which is fine) BUT the text itself remains whatever color is assigned to it. So if the text is black and I select the text I get black text on dark blue and you can't see the seclected text (see screen capture below). In previous versions (and every other program in the world) the selected text would reverse out in white. Is anyone else having this issue? Is there a way of changing this? The way it is now the new INDD CC is unusable because of this "bug" (?). Any help would be greatly appreciated.
    I'm using INDD CC (64 bit) on a PC running Windows 7 Pro (64 bit). I've checked my graphics card driver and it's up to date.
    Thanks!

    The problem lies with the Windows UI themes, particularly the Aero ones, but you can adjust the theme you're currently using to your liking.  Right click on the desktop > Personalize > WIndow Color (at the bottom of the Personalization window) > Window Color and Appearance - then click on Advanced appearance settings...
    And then I selected a lighter gray (in color 1).  Yeah, it's a few steps that I wish I didn't have to make - just because someone at Adobe thought, "that's not something that's gonna be a problem for anyone."

  • Is there a way to disallow web pages to modify foreground color of elements if background of those elements was not changed as well (and vice versa)?

    I have very sensible defaults for my display; i.e. I have dark GTK scheme (dark gray background, light gray text) that suits me way more when working on my computer while it's dark around. I, however, like looking at web pages as how they were mean to be seen. Unfortunately, most of web designers don't think about anyone having non-default colors set up.
    Example one ( http://www.cedok.cz ):
    This site's CSS style has "color: rgb(45, 45, 45);" for the whole <body> but for <select> elements there is no "background-color" set. This means there is a select box rendered with dark gray background and dark gray foreground (text color). This is pretty badly readable (obviously).
    To mention one particular element from this site: e.g. <select id="ctl00_ContentPlaceHolderLevySloupec_HledaniMultiTab1_HledaniZajezdu1_ddlTypZajezdu">
    Example two ( https://support.mozilla.org/en-US/questions/new/desktop/customize/form ):
    On this page (where I'm currently filling in this question) the <textarea id="id_content"> has "background: ... rgb(255, 255, 255);" set, but with my default font color, this textarea is rendered as light gray text on a white background. Again, pretty unreadable (and eye-hurting).
    I can provide screenshots and more reasoning if needed.
    I'm asking if there is (or might be) an option (even disabled by default) or at least an add-on which would keep default colors unless both foreground and background colors were specified. I think this might make Firefox very usable for many people which like to have their default colors configured.
    In case you won't be able to help me by fixing this, could you redirect me to the right place where I could get this requested in a way that might be really possible to happen (bugzilla?).
    Thank you very much in advance.

    Thanks for the reply, but I'm sorry, no. I don't want any addon that customizes colors, I want to use default colors and only prohibit changing them unless both background and foreground colors are changed.
    I have made no color changes WRT to Firefox *only*, I just changed the default for the whole toolkit (gtk in this case). The thing I need is to disable changing *only one* property out of two ({back,fore}ground). Whenever the second one gets set as well, this new setting (both of them) may get reflected, but not before that. It'd be nice to keep this when changing the colors back (deleting the style), but that's not necessary.
    I hope that's understandable, feel free to ask for if that's not the case.
    To express what I mean a bit more precisely, see the attached image. In that image there are four textareas (one of the elements that gets affected by this). First one is a default one (which I want to have if the page has nothing set), the second one is nicely modified to fit for example to a blue-ish page (this one I like as well).
    Second row of textareas shows how the final element looks like if the page has only one of these elements set up. First one changes background without changing font color, the second one vice versa. Both of them are very badly readable, especially with low lighting around.
    This is consequently the same case when it comes to default page background which I cannot set at all, because too many pages have only "color:" set without changed background and that is completely messed up then. Going to extremes, I might mention all color-related modifications (see how ugly the borders look when the background is changed and nothing is done to these borders, their size and color is kept default), but I understand that's too much.

  • Change the color of the text in textpane

    please suggest me how to change the color of the selected text color in textpane in jpanel
    class ComposeMailPanel extends JPanel implements ListSelectionListener, ActionListener, ItemListener
    JFrame frame;
    JTextPane jtextpane;
    JButton bInsertPic;
    JButton bBackgroundColor;
    JButton bForegroundColor;
    JFileChooser selectedFile;
    JFileChooser insertIconFile;
    JColorChooser backgroundChooser;
    JColorChooser foregroundChooser;
    JComboBox fontSize;
    SimpleAttributeSet sas;
    MutableAttributeSet sas1;
    StyleContext sc;
    DefaultStyledDocument dse;
    JScrollPane mainScrollPane;
    RTFEditorKit rtfkit;
    JComboBox fontFamily;
    MutableAttributeSet mas;
    Color backgroundColor;
    Color foregroundColor;
    String SF = "";
    public ComposeMailPanel()
         setLayout(null);
    bInsertPic = new JButton("Insert picture");
    add(bInsertPic);
    bInsertPic.setBounds(150,460,110,20);
    bInsertPic.setBackground(new Color(0,139,142));
    bInsertPic.setForeground(new Color(255,255,255) );
    bInsertPic.setBorder(borcolor);
    bInsertPic.addActionListener(this);
    bForegroundColor = new JButton("Set foreground color");
    add(bForegroundColor);
    bForegroundColor.setBounds(270,460,130,20);
    bForegroundColor.setBackground(new Color(0,139,142));
    bForegroundColor.setForeground(new Color(255,255,255) );
    bForegroundColor.setBorder(borcolor);
    bForegroundColor.addActionListener(this);
    fontFamily=new JComboBox();
    combofontfamilyinitialize();
    add(fontFamily);
    fontFamily.setBounds(420,460,110,20);
    fontFamily.setBackground(new Color(0,139,142));
    fontFamily.setForeground(new Color(255,255,255) );
    fontFamily.setBorder(borcolor);
    fontFamily.addItemListener(this);
    fontSize = new JComboBox();
    add(fontSize);
    fontSize.setBounds(550,460,40,20);
    fontSize.setBackground(new Color(0,139,142));
    fontSize.setForeground(new Color(255,255,255) );
    fontSize.setBorder(borcolor);
    fontSize.addItemListener(this);
    combofontsizeinitialize();
    sas = new SimpleAttributeSet();
    sas1 = new SimpleAttributeSet();
    sc = new StyleContext();
    dse = new DefaultStyledDocument(sc);
    rtfkit = new RTFEditorKit();
    selectedFile = new JFileChooser();
    insertIconFile = new JFileChooser();
    backgroundChooser = new JColorChooser();
    foregroundChooser = new JColorChooser();
         JScrollPane scrollPane2 = new JScrollPane();
         add(scrollPane2);
         scrollPane2.setBounds(150,300,577,152);
         jtextpane= new JTextPane();
         scrollPane2.getViewport().add(jtextpane);
         jtextpane.setBounds(150,300,572,150);
         jtextpane.setDocument(dse);
         jtextpane.setContentType( "text/html" );
         jtextpane.setEditable( true );
         jtextpane.setBackground(new Color(255,255,255));
         //jtextpane.setFont(new Font( "Serif", Font.PLAIN, 12 ));
         jtextpane.setForeground(new Color(0,0,0) );
         setBackground(new Color(0,139,142));
              }//constructor
    public void combofontfamilyinitialize ()
    GraphicsEnvironment ge1 = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String[] k = ge1.getAvailableFontFamilyNames();
    fontFamily= new JComboBox(k);
    public void combofontsizeinitialize ()
    //This function fills the combo box with font sizes
    fontSize.addItem("8");
    fontSize.addItem("9");
    fontSize.addItem("10");
    fontSize.addItem("11");
    fontSize.addItem("12");
    fontSize.addItem("14");
    public void setAttributeSet(AttributeSet attr)
    //This function only set the specified font set by the
    //attr variable to the text selected by the mouse
    int xStart, xFinish, k;
    xStart = jtextpane.getSelectionStart();
    xFinish = jtextpane.getSelectionEnd();
    k = xFinish - xStart;
    if(xStart != xFinish)
    dse.setCharacterAttributes(xStart, k, attr, false);
    else if(xStart == xFinish)
    //The below two command line updates the JTextPane according to what
    //font that is being selected at a particular moment
    mas = rtfkit.getInputAttributes();
    mas.addAttributes(attr);
    //The below command line sets the focus to the JTextPane
    jtextpane.grabFocus();
    public void actionPerformed(ActionEvent ae1)
    JComponent b = (JComponent)ae1.getSource();
    String str3 = null;
    frame = new JFrame();
    if(b == bInsertPic)
    System.out.println("inside insertpic");
    insertIconFile.setDialogType(JFileChooser.OPEN_DIALOG);
    insertIconFile.setDialogTitle("Select a picture to insert into document");
    if(insertIconFile.showDialog(frame,"Insert") != JFileChooser.APPROVE_OPTION)
    System.out.println("inside icon");
    return;
    File g = insertIconFile.getSelectedFile();
    ImageIcon image1 = new ImageIcon(g.toString());
    jtextpane.insertIcon(image1);
    jtextpane.grabFocus();
    else if(b == bForegroundColor)
              foregroundColor = foregroundChooser.showDialog(frame, "Color Chooser", Color.white);
    if(foregroundColor != null)
    String s1=jtextpane.getSelectedText();
         StyleConstants.setForeground(sas, foregroundColor);
    setAttributeSet(sas);
    public void itemStateChanged(ItemEvent ee5) {
    JComponent c = (JComponent)event.getSource();
    boolean d;
    if(c == fontFamily)
    String j = (String)fontFamily.getSelectedItem();
    StyleConstants.setFontFamily(sas, j);
    setAttributeSet(sas);
    else if(c == fontSize)
    String h = (String)fontSize.getSelectedItem();
    int r = Integer.parseInt(h);
    StyleConstants.setFontSize(sas, r);
    setAttributeSet(sas);
    thanks in advance

    Learn how to use the forum correctly by posting formatted code.
    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html]Text Component Features.

  • RichTextBlock selection text disappears

    1.I have two RichTextBlock controls placed in windows store application page. I use first to display text and selection of specific block and second to simulate dragging of text run. When I start manipulation of second one I return focus to the first control
    in order to display the selection. In this case I can see the selection but text becomes black and it disappears.
    2.Expected result is text in selection to have inverted foreground color.
    3.Actual result is that text foreground color is not inverted as for selection and visually disappears.

    Got code?
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • Changing foreground color

    I created a pre-block trigger with the following code to change
    the color of the text to red in instances when the value is less
    than zero. Unfortunately is does not work. Can anyone see what
    I am doing wrong here?
    DECLARE
    v_color varchar2(4) := 'R100';
    BEGIN
    IF :tbl_sales.points < 0 THEN
    set_item_property('tbl_sales.points',
    foreground_color, v_color);
    END IF;
    END;
    Thanks in Advance,
    JS
    Title : re:Changing foreground color O/S : MS Windows
    Author : Grant Ronald Type : Question
    Date : Jan 7, 2002 06:48 PT
    POST :REPLY (W/QUOTE)
    Color is an RGB value - so specify the full color value.
    DECLARE
    v_color varchar2(8) := 'r100g0b0';
    BEGIN
    IF :emp.sal <100 THEN
    message ('doing it');
    set_item_property('emp.sal',
    foreground_color, v_color);
    END IF;
    END;
    Regards
    Grant Ronald
    Forms Product management
    Title : re:re:Changing foreground color O/S : MS Windows
    Author : Jeff Starr Type : Question
    Date : Jan 7, 2002 07:00 PT
    POST :REPLY (W/QUOTE)
    I made the changes suggested but without sucess-- perhaps it is
    the type of trigger I am using?? I've tested using several
    different triggers without success. Now I am totally perplexed.
    JS

    First rule of debugging - keep it simple!!
    You'll notice I based this on the EMP table (keep it simple).
    I added a message line so I knew the code was being executed
    (simple).
    And I added the code in a "Key Print" trigger (fired when you
    select print from the default menu.
    It works.
    Try it with a new form and do the steps above.
    Grant

Maybe you are looking for