Preserving font change in a string subset

I have a program where a string subset of a string control can be different font color. If I manually type into this string control the font color is preserved. However, if I programmatically insert text at the bottom of the string control using concatenate strings, I lose my font color and all text is once again black...how can i preserve the font color?

for(imstuck) wrote:
So, on the front panel within the control you can select a certain amount of font, then set the color, and that color selection will only be applied to your selection. I tried to reproduce this on the BD but have been unable to. I have been digging through the properties, and I was hoping you could set the "selection" property (which you can) and then get a reference to your selection and set the color from there. But I see no reference to the selection. This is really a bummer, but maybe someone knows a work around.
If you were able to get the selection reference, you could change the selection in a loop, setting the end of the current selection to be at the next whitespace character. Then you could get/set all the words and their current colors. But, as I said, I don't currently see a way to do this.
You don't need to use a reference. You can change the color of a particular section of text by first using the selections start/end and then set the font color:
If you're doing a loop then you can apply the same method to change the color by word.
Attachments:
text color.png ‏14 KB

Similar Messages

  • Can we change data in string object.

    Can we change data in string object.

    Saw this hack to access the char[]'s in a String in another thread. Beware that the effects of doing this is possible errors, like incorrect hashCode etc.
    import java.lang.reflect.*;
    public class SharedString {
            public static Constructor stringWrap = null;
            public static String wrap(char[] value, int offset, int length) {
                    try {
                            if (stringWrap == null) {
                                    stringWrap = String.class.getDeclaredConstructor(new Class[] { Integer.TYPE, Integer.TYPE, char[].class });
                                    stringWrap.setAccessible(true);
                            return (String)stringWrap.newInstance(new Object[] { new Integer(offset), new Integer(length), value });
                    catch (java.lang.NoSuchMethodException e) {
                            System.err.println ("NoMethod exception caught: " + e);
                    catch (java.lang.IllegalAccessException e) {
                            System.err.println ("Access exception caught: " + e);
                    catch (java.lang.InstantiationException e) {
                            System.err.println ("Instantiation exception caught: " + e);
                    catch (java.lang.reflect.InvocationTargetException e) {
                            System.err.println ("Invocation exception caught: " + e);
                    return null;
            public static void main(String[] args) {
                    char[] chars = new char[] { 'l', 'e', 'v', 'i', '_', 'h' };
                    String test = SharedString.wrap(chars, 0, chars.length);
                    System.out.println("String test = " + test);
                    chars[0] = 'k';
                    chars[1] = 'a';
                    chars[2] = 'l';
                    chars[3] = 'l';
                    chars[4] = 'a';
                    chars[5] = 'n';
                    System.out.println("String test = " + test);
    } Gil

  • Is there a way to do a global font change in iWeb '09?

    Hi,
    I inherited a web site, created in iWeb '09. I've got the site files on my Mac ... when I start iWeb,
    and select a page to edit, it complains:
    The following errors occurred while trying to open this page:
    Missing Font TrajanPro-Regular
    Missing Font TrajanPro-Bold
    Missing Font HelveticaNeue-Roman
    Many (most or all) pages in the web site need these three fonts.
    Thru googling, I know that those three fonts are proprietary fonts that I could purchase.
    However, it seems silly to buy and install a font when the web server and end-user's
    browser won't have it (and will therefore get substituted at their end).
    Therefore, I think that my best choice is to change all uses of those fonts in the web site to
    be uses of some "standard web fonts".
    So, how do I do a global font change or substitution in iWeb '09? It seems like an awfully
    obvious thing to want to do. (Finding each instance of use and manually selecting the text
    and doing a font change is simply not feasible.)
    (E.g.: Change "HelveticeNeue-Roman" to "Helvetica Regular")
    thanks,
    Stan
    [email protected]

    how do I do a global font change or substitution in iWeb '09?
    There is no way to do what you want. Send a feature request to Apple via http://www.apple.com/feedback.iweb.html.
    OT

  • How do i edit the font size of a String?

    hi.. im a student in programming this yr.. i wan to edit the font size of a String.. how can i do that? i only know that there is setFont.. can anyone help me?

    import java.awt.*;
    import javax.swing.*;
    public class EditFontSize extends JFrame {
        public EditFontSize() {
            initComponents();
        private void initComponents() {
            jPanel1 = new JPanel();
            jLabel2 = new JLabel();
            jLabel3 = new JLabel();
            jLabel4 = new JLabel();
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setTitle("Edit the font size ");
            jLabel2.setFont(new Font("Dialog", 0, 14));
            jLabel2.setText("Test");
            jPanel1.add(jLabel2);
            jLabel3.setFont(new Font("Dialog", 0, 18));
            jLabel3.setText("Test");
            jPanel1.add(jLabel3);
            jLabel4.setFont(new Font("Dialog", 0, 24));
            jLabel4.setText("Test");
            jPanel1.add(jLabel4);
            getContentPane().add(jPanel1, BorderLayout.CENTER);
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-273)/2, (screenSize.height-118)/2, 273, 118);
        public static void main(String args[]) {new EditFontSize().setVisible(true);}
        private JLabel jLabel2;
        private JLabel jLabel3;
        private JLabel jLabel4;
        private JPanel jPanel1;
    }

  • Is there a way to have hardware acceleration without the text font change? + Eye straining firefox!

    Is there a way to have hardware acceleration without the text font change? I remember there was a way to go into settings before and getting hardware acceleration to work without the font change. Unfortunately I lost ALL my previous setting when uninstalling the beta ver Nightly and clicking delete settings :(.
    Also, I fixed a problem before where firefox was visually eye straining to me, I think it was some settings in anti-alias tuner, but I cant seem to find the right settings that puts less strain on my eyes, anyone know? Thanks ahead. Currently using FF7.

    Try to toggle some Boolean gfx.font_rendering prefs on the about:config page to disable some features.<br />
    Filter: gfx
    Others to try:
    * set gfx.direct2d.disabled to true to disable Direct2D
    *Anti-Aliasing Tuner: https://addons.mozilla.org/firefox/addon/anti-aliasing-tuner/

  • While editing a scanned pdf, Acrobat will not recognize the current font & change to very different font. How can I choose the font I want to match the current document?

    While editing a scanned pdf, Acrobat will not recognize the current font & change to very different font. How can I choose the font I want to match the current document?

     Thanks for answering. The version is XI.0.10. I just did the update yesterday hoping that I could now properly edit a scanned pdf document. Yes, it's happening on most all scanned documents. I followed your steps & found the list of fonts used in the document & then attempted to edit. The same occurs. When I type in a correction, I get an error alert... "the original font (in this case Fd 5805) is not available or can't be used in editing. Acrobat is using the font Minion Pro in its place." 
    When I select the text & right click as you suggested, my only choices are cut, copy, delete or select all, no "edit text".
    I have no other options to choose another font. Thanks for any help you can direct my way. 
    Debbie
          From: sukritd15 <[email protected]>
    To: Deborah Karr <[email protected]>
    Sent: Friday, February 13, 2015 5:35 AM
    Subject:  While editing a scanned pdf, Acrobat will not recognize the current font & change to very different font. How can I choose the font I want to match the current document?
    While editing a scanned pdf, Acrobat will not recognize the current font & change to very different font. How can I choose the font I want to match the current document?
    created by sukritd15 in Creating, Editing & Exporting PDFs - View the full discussionHi Deborah , I would like to know couple of things before I assist you further.1.Which version of Acrobat are you using ?2.Is it happening for all the scanned PDF' or any particular PDF? You can try these steps,Launch the scanned PDF >right click >Document Properties(from the drop down list) >Fonts(on the dialog box)>From here you will get the fonts used in that PDF . While editing the PDF ,select the text that are editing or typing in with the help of selection tool .After you select the text ,right click on the text and choose "edit text" from the drop down list .From there you will be able to choose the desired font . RegardsSukrit Dhingra If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7190881#7190881 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7190881#7190881 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Creating, Editing & Exporting PDFs by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Can't change the connection string of SSIS package with derived columns?

    We upgraded SQL server 2008 to 2012, copied and converted all SSIS packages from Visual Studio 2008 to 2010.  When I opened a package in VS 2010 and tried to change the connection string, in the local connection managers, if the data source is another
    SSIS package B(.dtsx file) with derived columns, I can't change the connection string of package B. When I opened the file connection manager editor for package B and tried to locate a dtsx file in another location, saved the change, reopened the project.
    Package B still pointed to previous file.  Other packages without derived columns work fine. Any thoughts?

    We are using the package deployment model and refer to other packages in the same project. If
    we changed the path of package B (with derived columns) to "D:\Visual Studio 2010\xxxx", and refer it in package A, in the A's connection manager, the connection string of package B is still its previous location  "D:\Visual
    Studio 2008\xxxx". When we ran the package A in the SQL server agent, the data source is still
     "D:\Visual
    Studio 2008\xxxx", so how can I change it to "D:\Visual
    Studio 2010\xxxx"? Why has the package C (without derived columns) no such problem? thanks.

  • Font changes when copy and paste url (Safari to Mail)

    When copy from iphone 5 (vs 7.1.2-& no I don't want to update yet ) Safari, a URL/web address and paste into MAIL app, the font changes and won't paste in the same format as the email I've been typing. Is there any way to correct this? Also, anything I type after the paste keeps that same "other" format, when I want what I had started email in to stay the same.
    I tho't I"d look at some settings and under iphone Accessibiilty I have Larger Text ON and Bold Text chosen, and Reduce Motion ON. Under GENERAL and TEXT SIZE I have it set to 4th choice up. I don't see any MAIL settings re FONT. Would any of these be the cause?

    OK, I think I found another way to describe my issue:
    When I copy text from a webpage in Safari, some form of "meta-information", or formatting data, is kept, and when I paste into MS Word, the formatting from the webpage is retained. In my default setup of Firefox, this formatting meta-information is not retained, it only copies the plain-text.
    So my question is actualy: How do I prevent Safari from retaining formatting data, and only copy the plain-text?
    I have been testing some clipboard managers, and have yet to find one that will auto-filter out formatting data from text that I copy, but they can after interaction.
    The other, current, method I have been using is to:
    1. select and copy the text in Safari
    2. paste text into notepad
    3. select and copy text from notepad
    4. paste de-formatted text into MS Word
    Or in Firefox:
    1. select and copy the text in Firefox
    2. paste text into MS Word (no formatting retained)

  • Changing the Host String in Oracle 10.2.0.4

    Hi,
    Can you please let me know how to change the Host String from ORCL to "production".
    I login now using the details below,
    UN: system
    PWD: production
    Host String: orcl
    Any help would be highly appreciated.

    Pravin wrote:
    Hi,
    I tried it but doesnt seem to work. Anyhow, i created a new database with my requirements and thus issue got resolved.
    Maybe you should have provided a bit of detail to "doesn't seem to work".
    I hope you didn't build a whole new house just because you couldn't get the key fit the front door . . .
    Thanks for your response. Appreciate it.Edited by: EdStevens on Sep 27, 2010 3:43 PM

  • 'Highlight' Character Style -- Why Does the Font Change?

    I want to define a style that mimics a highlight marker.
    Choose some text, set the background/fill to yellow.
    Highlight filled words, then choose 'Define Style From Selection..."
    Then, in the More... selection I deselect every attribute of the character style except for the fill colour. So this should highlight text, but leave every other attribute of the text unchanged -- I think.
    But whenever I apply it, the font changes to something I don't recognise -- even though the font is not a part of the character style description.
    What am I doing wrong?
    TIA

    You need to make sure the font is embedded in the PDF. This is optional in some sofware.
    If it is not embedded, your local font is used. No such local font exists on the iPad.

  • Font changes in a pdf document

    A document was created in Word, converted to pdf and e-mailed to be signed and returned.  Upon receipt of the signed document, it was noticed that some of the fonts had changed throughout the document.  How can a font change on a pdf'd document?

    Sounds like the font information was not embedded in the file. A common issue. They will need to embed those fonts and send you a different PDF.

  • Why do Certain fonts change when I convert to PDF from Microsoft word?  They start out 60s chic and end up as a standard font.

    Why do some fonts change when converted from Microsoft word to PDF?  It starts out as 60s chic and changes to standard font.

    Related to the question, I suspect you have licensed fonts that cannot be embedded. Thus, the PDF is using what it is finding to be an equivalent as well as it can guess. Did you check the font list in the PDF?

  • Font changed across multiple browsers?

    Recently the standard font in my Chrome browser changed to a funky font. I have searched my Font Book for this font to remove it and I cannot find it.
    I tried switching the fonts in Chrome Preferences to no effect.
    The font changes to this odd font in many text boxes (as in the one I'm typing in right now) but I see a standard Arial/Calibri in the "Question header" text box above this form... so strange.
    This went on for weeks until today when I opened my computer and Firefox updated itself. When it restarted, this ridiculous font is now in my text boxes in Firefox as well! I just checked Safari and yes, this blasted font is in Safari as well.
    I felt like it had to be a program that I've installed, but looking in my Applications folder, I just don't see anything that looks like it would produce an over-lapping setting for my text boxes...
    Does anyone have any suggestions?
    thanks!
    Brandon

    Have u found a solution to it? mine is driving me crazy!

  • Font changing in Outlook 2010

    Hi All,
    Weird one here that Prof. Google cannot answer. 
    I've got a user who uses Outlook 2010 as part of Office 2010 and then getting email from a particular customer the reply font changes from the standard to Sim Sun and sometimes it's just the body of the email and sometimes also the header too. 
    Does anyone have an idea why this is happening and more importantly, how to stop it?
    Thanks
    Liam

    Hi Aravindhan,
    Yes, only from an external recipient, when emailing colleagues the font issue is not apparent.
    The font of the inward email is Sim Sun, the font is not being changed at all. 
    Here is the diagnostics I have carried out so far:-
    Repaired and reinstalled MS Office
    Sending and replying internally does not replicate the issue.
    checked the Font used by going to FILE>OPTIONS>MAIL>SIGNATURES>FONT, confirms this is not the issue.
    Equally the 'stationary' being used is the default MS stationary within Outlook.
    Changing the stationary doesn't improve or worsen the issue.
    The issue is only present when using HTML as the email format.
    I've logged into the users machine as them and not been able to recreate the issue by sending test emails to myself and others.
    I have recreated the local user profile on the machine and the issue also persists.
    Formats and Regional settings are all US under control panel except for the time zone. 
    The issue does not show on OWA. 
    No other user in that office has the issue, the issue doesn't stop the user from working, the user percieves it as not appearing professional hence their concern. 

  • Some font changes not displaying in PDF output

    Hello,
    I have Developer 2000 R 2.1 on my workstation and I produced a report from an Oracle table in PDF format. It displays different font weights, styles and colors (black or red) depending on values in a particular column. We have Oracle 8.0.5.2.1 and Reports30.
    The PDF report is perfect when it is displayed through the 'Live Previewer' or displayed using 'PDF' under 'Web Preview'. After I send my 'REPORT.rtf' to the server and compile using 'conv.sh', I get a 'REPORT.rep'. When I try to display the PDF report from a web page, using 'REPORT.rep', the some font changes are missing. No italics, no bold in some instances. It does show 'red', but not in all the correct places.
    What am I doing wrong?
    Thank you very much for any assistance.
    Paul

    Hi,
    the PO Output for Communication does not use the $OA_MEDIA variable so you have to provide the full path to your images, example url:{translate(concat('/d01/oracle/prodcomn/java/oracle/apps/media/',BILL_TO_LOGO),' ','')}
    Hope this helps as it works for us.
    Regards,
    Imtiyaz

Maybe you are looking for