different text color in the same line for staticText ScriptUI?

is it possible to have different text color in the same line for staticText ScriptUI?

for example, I don't want red color for the word 'RED' text below in the SAME line.

var l is new window ('dialog', 'Sélection');.

var s = w.add ('statictext', undefined, "It's a RED pen");
w.Show ();

Thank you!!

Simple,

var w = new Window ("dialog","Selection"),
     g = w.add('group'),
     s1 = g.add('statictext', undefined,"This is a"),
     s2 = g.add('statictext', undefined,"RED"),
     s3 = g.add('statictext', undefined,"pen");
g.spacing = 4;
s2.graphics.foregroundColor = w.graphics.newPen(w.graphics.PenType.SOLID_COLOR,[1,0,0],  1);
w.show();

I'm sure that's the answer makes sense "only".

Trevor

Tags: InDesign

Similar Questions

  • Midp2.0 ItemImage and ItemString text right on the same line?

    Y at - there a trick to this on the Blackberry Pearl.

    I want an Image and text to the right of the image, then the first line

    in a configuration form. I am trying to support the Pearl 8110 and so on

    He just puts the Image on a line by itself any combinations of layout

    I use

    try {}
    Image image=Toolkit.createImage("/tivoli.png");
    ImageItem it = new ImageItem ("", image, Item.LAYOUT_2 |) Item.LAYOUT_SHRINK | Item.LAYOUT_LEFT,"");
    SF. Append (IT);
    } catch (Exception e) {}
    }
    StringItem tr = new StringItem ("", "a" + tbsmNLS.get ("label - conf") + "\n");
    si.setFont (Font.getFont (Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
    si.setLayout (Item.LAYOUT_2);

    The WTK emulator works well for every combo I seem to think would work

    and I'm tired of construction and train to test on the

    real device to work. The image and the string very easilly can fit on a line.

    This works also very well a Nokia E60

    Just surrendered and wrote my own label

    package com.ibm.tivoli.midp;
    Javax.microedition.midlet import. *;
    Javax.microedition.lcdui import. *;

    public class ImageString extends CustomItem {}
    Image img;
    String st;
    Do police;

    public ImageString (Image image, String title) {}
    Super("");
    make = make .getFont (Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM);
    IMG = image;
    St = title;
    }

    protected int getMinContentHeight() {}
    Return img.getHeight ();
    }

    protected int getMinContentWidth() {}
    Return img.getWidth () + font.stringWidth (st) + 5;
    }

    protected int getPrefContentHeight (int width) {}
    Return img.getHeight ();
    }

    protected int getPrefContentWidth (int height) {}
    Return img.getWidth () + font.stringWidth (st) + 5;
    }

    protected void paint (Graphics g, int w, int h) {}
    g.drawImage (img, 0, 0, Graphics.LEFT |) Graphics.TOP);
    g.setFont (do);
    g.drawString (st, img.getWidth (), img.getHeight () - do .getHeight (),)
    Graphics.LEFT | Graphics.TOP);
    }

    protected boolean crosses (int, int viewportWidth, viewportHeight int dir,
    {int [] visRect_inout)
    Returns true;
    }

    Protected Sub sizeChanged (int w, int h) {}
    }
    }

  • Can I put some PFI ports on the same line for use with counters and leave the rest as static DIO? (USB-6218-USB)

    I only need a port of each line for the use of the PFI and want to use the rest for the digital I/o. Before you complete the design of the circuit and test it myself, I would like to check it out. I can't find the answer in the textbooks, either.

    Thank you

    Ben

    Hello Ben,

    If you use all the PFI lines you can use the rest as DI/O. PFI0, 1, 2, 3, 8, 9, 10, 11 are entered digital and PFI 4,5,6,7,12,13,14,15 outputs digital. Another technique you can use is to create a spot on the measurement and Automation Explorer, if it allows you to create it, then it is possible.

    Best regards

  • In InDesign, 2016, how to add text to extra chips on the same line for a bulleted list?

    Asked me to review a brochure (column 3) tri-fold to register an additional point to chips on two lines of what is not a bulleted list, consisting of a single element per line.  Is there a simple (relatively!) to do this? Any help is greatly appreciated as I have not done this before.

    Shawn.

    Thanks Bob!

    Shawn

  • Can you change text of reversal in the same range for different triggers?

    Hi, I have not used Fireworks since version 3, which was about 6 years ago when I dabbled in web development.  My past has turn against me, and I need to make a pretty simple site quickly enough for my boss.  I myself have CS4, and now that I understand that you can only use the buttons for disjoint bearings, I begin to make progress...

    What I want to achieve, is that there are 6 "buttons" on my page, which, when they you flipping them will display the text in a box on the side.  I would use separate boxes for each button, but there is not enough space on the page, because there is a lot of text, so I would use a box at the same place to display all 6 texts, according to which the button is reversed.  Is this possible?

    I have no doubt entirely my head layers round and this may be very simple, but could someone please point me in the right direction, even if it is a link to the right drill bit using the product?

    Because the reversal disjoint button does not work, I created 6 slices for triggers.  I first tried the hot spots, but could not use them as I want as a direct substitution trigger the filter effect.

    Yes, you can trigger the different content on the postponement of several other sections.

    It is easier to show the describe statement, so here is a sample file that does what I think you are looking for:

    (1) six buttons

    (2) each button a unique text

    (3) each button corresponds to a rollover State

    (4) single text appears in the same place for each button on turnover

    I hope this helps!

    Dave

    Right-click and save the image below - it's a Fireworks source file:

  • I tried for AN HOUR to find a way to put the two different fonts on the same line

    Pages is crap. I tried for AN HOUR to find a way to put the two fonts on the same line, even if I highlight 1 WORD, the whole line changes (if you know how to do that please tell me, I'll me CRAZY!). Wouldn't recommend, that Word is 100 x better and easier to use

    < published by host >

    Hi varn,.

    Seems to work here (Pages of screen capture):

    Select (highlight) the text you want to change. Click on the Format brush, and then click Style. Choose the font you want to use.

    The example above is in the text layer. I also tried in a text box and a table cell.

    I also tried to change the font for a single word of a line of text in Pages for iOS. The police has changed to the selected word, while the rest of the line remained in the police, he had previously.

    Cannot test it in 5 Pages, because I have not installed. The above example is Pages ' 09.

    It is possible that you have applied to a paragraph Style, what would change everything in the paragraph containing the insertion point.

    Kind regards

    Barry

    PS: MS Word is available for OS X, if you feel the need to switch.

    B

  • Sales order form, line status code is displayed as "WITHDRAWN". but the same code appears as "AWAITING_SHIPPING" for the same line in the database. can you please explain, where the value in frontend comes? It differs from the flow_status_code in oe_or

    Sales order form, line status code is displayed as "WITHDRAWN". but the same code appears as "AWAITING_SHIPPING" for the same line in the database.

    Where the value in the frontend is filling?

    It differs from the flow_status_code in oe_order_lines_all?

    Thanks for the correction.

    He slipped right out of my mind!

    Here is a detailed explanation of this case:

    Status of orders picked and picked partial

    Kind regards

    Bashar

  • Text links in different color on the same page

    Is it possible to create text links which are of different colors on the same web page? I use CS4 on Mac. I have CS6, but obviously, I know so little about the design of web sites that I'm terrified of switching. In any case, I just want to know if it's possible. Thank you.

    Julie

    Well Yes, you can do it using css.

    In the css to your page, you can add something like...

    {a.redlinks}

    color: Red;

    }

    {a.Bluelinks}

    color: Blue;

    }

    And in the html code, all the links that you want to be red, the value of their class to redlinks and links you want to display blue, add the class bluelinks.

    They end up that looks like this...

    A text

    A text more

  • How to apply different fonts to text (words) in the same field

    Please help, how to apply different fonts to text (words) in the same field. I want to select text and apply the font, size and color on the selected text in the field, this code below, the setFont method changes all the text in a field (message) of a select statement to the police. Help, please

            message = new AutoTextEditField("","",maxNumChars,editableStyle)
            {
                protected void layout(int width, int height)
                {
                    super.layout(width, height);
                    this.setExtent(550, 250);
                }
            };
            message.setBorder(border);
            message.setMargin(xyEdgeForMargin);
            message.setPadding(xyEdgeForPadding);
            message.setFont(_menuFont);
    

    Just write your edit as field

    SerializableAttribute public class RichEditField extends BasicEditFields

    {

    int [] offsets = null;

    Are police [] = null;

    String text = null;

    RichEditField (label As String, String text, int [] offsets, make police [])

    {

    Super (label, text);

    This.Text = Text;

    This.Label = Label;

    Offsets = this.offsets;

    This.font = do;

    Add validation for offsets and text here

    }

    RichEditField (label As String, String text)

    {

    Super (label, text);

    This.Text = Text;

    This.Label = Label;

    This.offsets = {0};

    This.font = {g.getDefaultFont ()};

    Add validation for offsets and text here

    }

    / * Here is a method to add customization of fonts as

    setFont (offset, length);

    setFont (offset);

    public void paint (Graphics g)

    {

    g, Clear ();

    for (int i = 0; i)<>

    {

    calculate it according to x, y using offset

    int length = 0;

    g.setFont (do [i]);

    If (i<>

    length = offset [i + 1] - offset [i];

    on the other

    Length = Text.length () - offset [i];

    g.drawText (text.substring (0, length), x, y);

    Super.Paint (g);

    }

    }

    This method is not compiled may have errors and may have many features according to your needs.

  • Question: The Horizontal text tool enter key returns to the same line

    Hello

    This is my first post on this forum, and join me this Community aims to ask for help whenever I'm stuck all by learning Photoshop CS6 extended.

    I have been unable to find solution to this little problem... When you use the horizontal type tool I press ENTER key, the cursor returns to the same line and again write the previously written text. I did not have this problem while doing the same thing before, so I think I messed up a few parameters. Help, please.

    Also let me know how to set up Photoshop to its default settings, I mess up something else.

    Thank you.

    Your leader is off. Set it to automatic.

  • appearing in two different colors at the same time container attached screenshot.

    post.JPGHello

    I am very impressed with this site's Look, you can see that
    in this the container showed up in two different colors at the same time as shown in the attached screenshot.

    Please tell me how to get there?

    A part is loading advertising and other view their business rules.

    Please tell me how to get this behavior

    Because when I use the Application container = 'black' background color, it displays the container integer oiail color.

    Help, please

    Thanks in advance.

    There are many ways to achieve this. We can be to use the background image for the application. Other means may be to use various containers (Panel, canvas etc with background pictures) to get this look. Think of it in HTML view. How you can use the div tags to your page layout, you can use various containers of Flex to your page layout.

  • There was a problem creating the destination folder. If please check the permission of folder or choose a different folder.   What that means, tried to name several different folders, but still the same error message. Would be grateful for the help!

    There was a problem creating the destination folder. If please check the permission of folder or choose a different folder.   What that means, tried to name several different folders, but still the same error message. Would be grateful for the help!

    This means that the folder you want to create is blocked because of file permissions. The drive or folder you are trying to create the destination folder is set to read-only, and your username does not have write permissions.

  • for each loop to print the values in the same line?


    Hi guys,.

    For our customer, I create a RTF file.

    In one line, I use this:

    Internal req. Ref #: <? for-each: G_2? > <? SEGMENT1? > <? end foreach? >

    Now when I run this report this part of line shows the values in separate lines

    Output:

    -----------------------------------------------

    Inside Ref No. DDE:

      226

    230

    ------------------------------------------------

    How can I make it back in the same line. Like this and separated by commas

    -----------------------------------------------

    Internal req. Ref #: 226 230

    ------------------------------------------------

    You can use inline grouping, please take a look at these posts:

    https://blogs.Oracle.com/XmlPublisher/entry/inline_grouping

    Re: Using conditional output

    Re: Display data from a list in a single field with values separated by commas

  • By creating a form that has several text boxes to a single character on the same line, how can I get the cursor to go in the next text box automatically after inserting a character?

    By creating a form that has several text boxes to a single character on the same line, how can I get the cursor to go in the next text box automatically after inserting a character?

    Create a text field and use the option 'comb n characters.

  • Is it possible to convert the standard numbered list to the list that appears on the same line a right after another? As indicated in 1. Text goes here, 2. Text goes here, 3. Insert text here

    Is it possible to convert the standard numbered list to the list that appears on the same line a right after another?

    Instead

    1. Insert text here
    2. Insert text here
    3. Insert text here

    This

    1 text goes here, 2. Text goes here, 3. The text here.

    This revised list can take multiple lines.

    I use InDesign CC2014 - if that makes a difference.

    the only way is to convert numbered in the text (select numbered list > ctrl (or right click) > bulleted & numbered lists > convert numbered text).

    Then, with search - replace, you can change the paragraph returns in space (or in space by commas as in your example)

Maybe you are looking for

  • Win 7 lock switch or fingerprint utility

    This isn't real bug but improvement tips. Toshiba Fingerprint Utility allows only the connection of the lock for a locked user screen in fact a computer (for example using closing the lid). This is a limitation of Windows 7/Vista (opposite on WinXP)

  • How to recover my laptop Satellite Pro?

    Hey I met unmountable_boot_volume blue screen so decided to just format the pc, however; When I select repair your computer, it shows windows loading page "files" and then after all turns black with a white cursor... I have a satellite installed pro

  • Can I remove video iCloud iTunes App TV series?

    I am able to delete the movie to appear in my app video iTunes when they are not currently downloaded on my iPad? In other words, can I remove old and already deleted of the icloud television so that I can relieve my videos? Once again, here are the

  • Best way to generate signals of activation (square wave) with my 9401 on my 9022?

    Hi, I tried seriously over the past two days to find the best way to do it. I am trying to generate a very precise square wave, controlling the duty cycle and frequency, with the OID on the 9401 in testbed cRIO 9022. I have a VI that is theoretically

  • Microsoft LifeChat zx-6000 to change the battery?

    I have seen that the rechargeable battery is available for sale. How to open the Microsoft LifeChat zx-6000 device to change the battery? Zeev was soon.