Setting the style of a label

a few complete examples on how to do this... setting its
color, font size, etc...
thanx a bunch!

Hi xyco45,
On a Label component you can aply style preety easy by the
Design mode of Flex Builder, by the Code mode, or by a CSS style. I
leave you with some simple samples.
Code Mode:
<mx:Label text="Sample Text" fontFamily="Georgia"
fontSize="36" color="#004000" fontWeight="bold"
textAlign="right"/>
CSS Mode (Best to keep your Apl. uniform and easy
modification) :
#Define the style's
#Here you can use real CSS sintax's or the style's sintax
from flex like in the sample in the code mode.
<mx:Style>
.youStyeName {
color: #FFFFFF;
font-size: 24;
</mx:Style>
Then you say to the Label to use this Style by the styleName
prop :
<mx:Label text="Sample Text" styleName="youStyeName"/>
Hope i Help,
Core . Regards

Similar Messages

  • In the properties window from a CWGraph you can set the style (bar, line, multicolor). How can you do this programmaticly?

    I can't find the style property in my object inspector(Delphi). With style, I want to set the graphic type. For example: simple, bar or multicolor. In the help from the CWGraph object I can not find anything about it. I have solved the problem now by exporting the desired graph and then import it if I create a new object Dynamicly. Does anyone have an answer?

    You set the style for each individual CWPlot, not the graph itself. Each plot can have its own style, the graph style sheet is just there for quick changes of common plot styles. You would change the LineStyle, PointStyle, Colors, etc of each plot to do this programmatically. For example, to pick a bar style for a plot you would:
    CWGraph1.Plots(1).LineStyle = cwLineStepXY
    CWGraph1.Plots(1).FillToBase = True
    CWGraph1.Plots(1).PointStyle = cwPointNone
    This would create a plot that steps and is filled to base with no points shown (bars). If you want to see how the graph styles change the plots, pick a graph style in the property pages, then look at the plot page and see how the plot properties changed.
    Best Regards,
    Chris Matthews
    Measurement Studio Suppo
    rt Manager

  • Setting the text on a label

    Ok, I am new to writing Java programs and I am having trouble setting the text on a label. I think I am following the syntax perfectly but my compiler wont accept it. This used to work for me then all of a sudden it didnt work.
    Here is the code that I was writing. I am trying to set the text of the Label lab1. What am I doing wrong?
    import java.awt.*;
    import java.applet.*;
    public class exer4 extends Applet
    Button but1;
    TextField txt1;
    TextField txt2;
    Label lab1;
         public void init()
         but1 = new Button("Click Me");
         add(but1);
         txt1 = new TextField(5);
         add(txt1);
         txt2 = new TextField(5);
         add(txt2);
         lab1 = new Label("This is a label");
         add(lab1);
    }

    Try this
    import java.awt.*;
    import java.applet.*;
    import java.util.*;
    public class pay extends Applet
    Button but1;
    TextField txt1;
    TextField txt2;
    Label lab1;
    public void init()
    lab1 = new Label("This is a label");
    Panel pan = new Panel();
    pan.add(lab1);
    add(pan);
    but1 = new Button("Click Me");
    add(but1);
    txt1 = new TextField(5);
    add(txt1);
    txt2 = new TextField(5);
    add(txt2);
    ps see you around

  • How to set the Font size of Label?????

    Hello everyone.
    I want to knoe how to set the Font size of the Label???
    Please help..
    Thanks a lot.
    Gloria

    Label myLabel = new Label("Hello World");
    //Font(String name, int style, int size)
    myLabel.setFont(new Font("Arial", Font.PLAIN, 12));

  • How do you set the fontSize of a label in AS?

    I am tinkering with a neat little component I found, and I
    added a few labels to it. In the AS code there are now four labels.
    I wanted to change the default font size on one of the labels,
    which I know how to do in mxml but I don't really understand how
    that translates to a component in ActionScript.
    Imitating the way height and width were set, I tried:
    label.fontSize="10";
    but this gives me an error 1119 "access to possibly undefined
    property fontSize through a reference with static type
    mx:controls.label"
    Can someone tell me how to set the font size within an AS
    component?
    M.

    quote:
    Originally posted by:
    Greg Lafrance
    Actually you may need to do this, but don't name your objects
    "label" otherwise you will have a conflict with Flex property
    names.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    private function clickHandler():void{
    lbl.setStyle("fontSize", 30);
    ]]>
    </mx:Script>
    <mx:Label text="One"/>
    <mx:Label text="Two"/>
    <mx:Label text="Three"/>
    <mx:Label id="lbl" text="Four"/>
    <mx:Button label="Test" id="btn"
    click="clickHandler()"/>
    </mx:Application>
    This is mxml though right? How could you translate this into
    AS? This thing is an AS component.
    By the way I'm not using the name label I just changed to
    that to make the code generic / easier to understand. The label
    names are minLabel, maxLabel, and topLabel
    M.

  • MOUSE_DOWN, MOUSE_UP events work only if I set the style to my SkinnableContainer

    I am designing a physics container. Don't worry, my question is not  about the physics. Here is my code. Noticed that I have a  SetStyle statement there. I realized that if I don't have that line, the  MOUSE_DOWN, MOUSE_UP events won't work. If I do have that line, then  those events works fine. Anyone know the reason?
    package components
         import flash.events.MouseEvent;
         import spark.components.SkinnableContainer;
         public class Test extends SkinnableContainer
              private var mouseDown:Boolean;
              public function Test()
                   super();
                   //setStyle("backgroundColor", "0xBBBBBB");
                   addEventListener(MouseEvent.MOUSE_DOWN, mouseDownEventHandler);
                   addEventListener(MouseEvent.MOUSE_UP, mouseUpEventHandler);
              private function mouseDownEventHandler(mouseEvent:MouseEvent):void {
                   mouseDown = true;
              private function mouseUpEventHandler(mouseEvent:MouseEvent):void {
                   mouseDown = false;

    Mouse events only fire on "drawn pixels".  If there are no pixels drawn, the
    mouse events fall through to the next thing in the background.

  • Setting the font style and color for FileChooser labels

    Hi Friends,
    I have a certain standard Font style and color set for my application GUI. Now, I want to set the style and color for Swing components like FileChooser. Is it possible ?
    Also is it possible to localize JOptionPane ?
    Please advise.
    Best regards,
    Harilal.

    Does anybody knows how to do that?

  • Can I set the text color in a Label?

    Hi everyone ~
    Can I set the font color in PP? I only found that there is a "setBackground".. but I want to set the color within a Label.
    Thanks!
    Gary

    Fixed it!
    There was a global style for s|Label and since the Spark button uses one of these for the text, that was it.

  • How to set the BARCODE width and length for label printing..

    Hi All,
    How to set the Code 39 barcode label format in the sizxe of 0.20" * 1.4". By default while printing barcode size exceeds my current requirement. Please let me know to customize the size of barcode labels.
    Thanks.

    I don't know what you mean by "Code 39" because my Output Designer software doesn't offer that barcode (or do you mean "code 3 of 9?). In any case, are you trying to control the size of the text (which is what I think of when you refer to "label")? If you are, then just change the font & size. If you are wanting to modify the physical characteristics of the barcode itself (height & length for a certain number of characters) then you are probably out of luck. Or at least in for some trial & error.
    There are a series of "barcode.xxx" files in the 'config' folder where Output Designer was installed to. These are text files that contain the physical characteristics of the various barcodes for various printers. The parameters that you would be interested in is the height and width of the bars (black & white). For example, a barcode might be defined as .400 high with narrow bars 3 "dots" wide, wide bars 9 "dots" wide and white space the same or different. Presumably changing these values would affect the generated barcode. For example, in this example the wide bars are 3 times the width of the narrow bars so I would assume that relationship would have to remain. To make the resulting barcode shorter you would then use 2 for the narrow and 6 for the wide.
    You would have to make the change in the file(s) that would be used for your printer(s).
    There are four width values for each of the parameters. Most of the barcodes only use 2 but some have 4. I'm assuming that when there are 4, like in "4 8 12 16", that the barcode definition has 4 different widths of bars and/or spaces.
    There is no guarantee that the scanning hardware & software will "see" and interpret the resulting barcode correctly.

  • Is it possible to set the cell height in a cell style?

    In the attached screenshot, the cell height is set to exactly 0.125. I put my cursor in the cell, then opened the cell styles panel and created a new cell style based on this cell. But when I apply the cell style to other cells, it does not apply the cell height. There were no overrides or other styles applied to the other cells. I also opened up the cell style definition from the cell styles panel, but don't see anywhere to set the cell height there either. Is there another way to do this that I am missing?

    It is possible - and it's fairly simple.
    To set the row height as part of the cell style, all you have to do is use the cell inset above and below. As long as you set the style as 'At least' then this works perfectly well for having predefined cell styles.
    I have been using this successfully for large financial documents for some time without any hitches. For example I use it to get separation between sections within the tables by having a style with extra space above, and similarly for totals rows at the bottom of the table. It can of course also apply different stroke styles at the same time. Having the style set as 'At Least' also allows for multiple line entries to still have the correct spacing above and below.
    So if you spend a bit of time calculating required heights and setting up your styles, then apply a keyboard shortcut to each style, you can then save a whole lot of time when formatting the document.
    I've just finished nearly 400 pages of financials using this method over the past couple of days!
    This solution may not suit your sitation, but if you have a lot of tables to get through it's got to be worth giving it a try.

  • Setting the charatcter style

    Hi, I'm working with C# and COM automation to compile a tv guide. I need to apply for every textframe the right char style. Right now I parse each char and I set the style in this way:
    ch.AppliedCharacterStyle = charStyle;
    this tast is very slow process.
    How can I work on a set of characters appplying the style in a single command? Is it possible?
    Thanks a lot,
    Andrea

    I don't think that GREP will be usefull ;)
    Andrea need to find begin and end of interesting part of Paragraph content
    time is easy - first 5 chars or to first space
    but finding the rest ... or wait ;)
    Andrea - do all your listings have structure:
    (time)( )(type)( )(title)
    where:
    (time) is 4 or 5 characters
    (type) is any text without spaces
    (title) is title without any other parts like, description, rating, etc.
    and all parts are separated by ( ) - space ?
    if yes - you can use NestedStyles feature of ParagraphStyle - by setting " " (space) as first and second "up to" sperarator
    and one more question - can you export or can you request TV listing in other format - with (tab) as "field" separator ?
    below is link to example InDesign Tagged Text file with ParagraphStyles set to " " (space) as separator
    http://www.adobescripts.com/TVGuide.zip
    just place it to your InDesign document :)
    robin
    www.adobescripts.com

  • How to set the Paper TYPE?

    We have HP Multifunction printers here at work, example the HP Laserjet 4345 MFP.
    In Output Designer I have no problem setting the Presentment Target, almost always just set it to HP Laserjet 8000/8000N (PCL5).
    My problem is that I can control the tray but I can't set the paper type.
    My scenario is that the printer is defined at the printer to have Paper Type of 'Label' in Tray 2, and 'Plain' in Tray 3.
    When Jetform sends the job to the printer to Tray 2 it does not print on tray 2 because the Paper Type is set to 'Label' and then gets sent to Tray 3 instead.  The Jetform job in this case is a 8 1/2 x 11 label design, really intended for that Tray 2 'Label' Paper type.  It's important because when you set the Paper Type as 'Label' on the printer it mechanically slows things down and changes heat from what I've been told and handles label paper better vs. the 'Plain' settings.  The result is less paper jams.
    So...Can anyone tell me how to pass into the job paper type?  Paper Size and Input Tray, are the 2 options I see under Format Page and neither really address Paper Type.
    Thanks,
    Bill

    I'm surprised that nobody has any ideas on this topic!?  This is a major drawback or seems to be.
    FYI -  This is printing from an HP-UX 11.23 Itanium based Unix system.

  • How to change the style of the main application window shell

    Hello,
    I am migrating my application from eclipse 3.x to eclipse 4.3 and I want to set the style of the main application window i.e. the shell that is created in application MTrimmedWindow in e4.
    Earlier we were doing it using
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(0, 0));
    configurer.setShowCoolBar(false);
    configurer.setShowStatusLine(false);
    configurer.setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE);
    But now in e4 application after reading some forum replies I got to know that custom renderer needs to be created for that.
    I created my own renderer extending WBWRenderer and as I wanted to change the style of shell I am overriding createWidget method.
    Now the problem is that if I am just creating a new shell in this createWidget method then it is not working. Might be because this method has a lot of other code also.
    So I copied all this code into my overridden method of createWidget & just changed the style of shell according to my need. Then this worked but for this I have to put some private methods also into my custom renderer class from WBWRenderer.
    SO my question is to confirm that if I am doing it in a right way?
    or is there any other mechanism to do this in a more efficient way?
    Thanks

    This can now be solved with a specific "persisted state" key flag, as documented in https://bugs.eclipse.org/bugs/show_bug.cgi?id=386951 . For example to realize a NO_TRIM window, add the key/value styleOverride/8, where 8 is the value if you get the numeric of
    int val = SWT.NO_TRIM;
    System.out.println(val);
    Hey Zugi: Liebe Grüsse! Master UIBK/2010

  • Where do I find the Style pop-up menu so I can choose mailing labels?

    I've set out below the Help item for printing mailing labels from Address Book but I don't get any Style option with my printer which is a reasonably up to date HP 1200 Laser. Have I got the settings wrong somewhere
    To print mailing labels:
    Select All or a group in the Group column, or select specific contacts in the Name column.
    If contacts in the group you selected have multiple addresses, you can choose which address to use for each contact.
    Selecting addresses for group members
    Choose File > Print.
    Choose Mailing Labels from the Style pop-up menu, and then set other options:
    Layout: Choose a type of label from the Page pop-up menus. Select Define Custom to set the page margins and the gutter space between labels, and to specify how many labels to print on a page.
    Label: Choose which addresses to use from the Addresses pop-up menu. Choose the order in which to print the labels using the “Print in” pop-up menu. Add a small graphic to the labels by clicking the Image Set button; change the font by clicking the Font Set button.
    Click Print.

    Assuming you are in Address Book, you choose the records you want to print and then the File/Print menu selection.
    If the printer menu comes up with only the name of the printer and "Presets" dropdown choices, you click on the arrow to the right of the printer name to expand the print menu. Make sure the box below the pages to print is showing "Address Book" and you will see the "Style" below it.

  • Setting the text in label components

    Please help with the following very simple code. I have done
    everything I am supposed to do according to the in-program help,
    the Flash 8 Actionscript bible and every other source I can find
    online, yet the following code will not generate a simple label
    component. I've checked to insure it is not placed too far in any
    direction and even played around with its styles, setting the font
    and font color -
    nothing. It's been 2 hours now... I'm really starting to
    hate components.
    Without exaggerating, it took me roughly 4 hours to figure
    this out: I replaced all of the "getNextHighestDepth"s with numbers
    (starting the numbering at 0) and everything showed up. Turns out
    the label code was working, but the label was getting replaced by
    the next component called in the code because they were all at the
    same depth. I thought getNextHighestDepth() was supposed to prevent
    this!

    >> I have done everything I am supposed to do according
    to the in-program help
    Not exactly. You should have been using the DepthManager
    instead of getNextHighestDepth.

Maybe you are looking for

  • PO split  in  sourcing cockpit   ?      :-(

    Hello my helpful friends.je.je I have quick question for the SRM gurus: In the sourcing cockpit, I selected 20 items (per example) and the application splits those items among 2 purchase orders. What is the reason of this behavior ?  I know that ebp

  • Late 2013 retina macbook pro drops thunderbolt ethernet cyclically

    My new (late 2013) retina macbook pro drops the wired ethernet connection many times a day. Each time killing off all VPN and ssh sessions. This is using the apple thunderbolt to gigE adapter. This is the second thunderbolt adapter I've received from

  • Mac Mail accounts showing "offline"

    Hi: I am using MacMail (6.6 1510) on 10.8.5. I have two gmail acounts, a yahoo, and two non-web based emails (one is POP, one is IMAP). For several days now, all of the accounts, except the POP (it works fine) are not allowing me to send email. It sa

  • Dynamic TAG - Simple Transformation

    Hi All, I need work with dynamic TAGS (Elements) on Simple Transformation? The tag should be <Invoice> or <DebitNote> depending on a Variable. How can I achieve this? Thanks and Regards,

  • Photo's for Mac - Drag/Drop issue

    I used to be able to drag and drop photos from iPhotos to Photobucket and it won't let me now since the upgrade to Photo's for Mac. Does anyone know why and is this just a bug that will be fixed in time?