Change a Labels Style

I was wondering if anyone can help me out. I am trying to
change a style of a label dynamically. The problem is I get an
error "Call Attempted on an object that is not a function" if I try
to define the var as an object and it doesn't work correctly as a
string (even with [] since they killed the eval function).
This works fine:
lblHome.setStyle("color", "#FFFFFF")
When I try to do it dynamically is when I get the error:
private function itemOver(event:MouseEvent) : void
var itemID:Object = event.currentTarget.id;
itemID.setStyle("color", "#FFFFFF") --- When I debug itemID
is defined as lblHome
When I try to eval a string it changes style for all labels
for some reason:
private function itemOver(event:MouseEvent) : void
var itemID:String = event.currentTarget.id;
[itemID]setStyle("color", "#FFFFFF") --- When I debug itemID
is defined as lblHome
Can someone please help me... I am new to flex and trying to
redo a ColdFusion flash forms app.
Thanks

sloan2b wrote:
> I think I read somewhere else, but is there a problem w/
> getting the hand cursor to display? I set
useHandCursor="true" and I dont get
> the hand cursor over the label? Will this be fixed in
the next version?
useHandCursor is not supported for Label (it's a
documentation bug that they
are listed there). But you can use <mx:LinkButton>
instead (and you can
change its styles, as desired, to make it look more like a
Label if you want to.)
By the way, on those controls that *do* support
useHandCursor, don't forget to
also set buttonMode="true".
Mike Morearty
Developer, Flex Builder team
http://www.morearty.com/blog

Similar Messages

  • How to change header font style in Spark DataGrid?

    I'm looking since last week for a way how to change the font style of the header in a Spark DataGrid. It drive me nuts that I can't find a way to do this. Have anyone one an idea how to achieve it? Any help is appreciated.
    Thanks,
    - Artur

    Hi,
    Some styles won't work because some text styles got hardcoded into the DefaultGridHeaderRenderer's Label. You'll run into this issue not just with the DataGrid headers but also things like the Panel's title and other places where we have text. One way to get around this issue is to create your own custom headerRenderer based on the default one and then redefine the headerRenderer skin part in the skin.
    First, create a subclass of the DefaultGridHeaderRenderer and tweak the "labelDisplay" to your liking (or even just take out all the styles and style it on your own as you had earlier using your custom header renderer's name). Example below (I named it "CustomHeaderRenderer"):
    <?xml version="1.0" encoding="utf-8"?>
    <skins:DefaultGridHeaderRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     xmlns:skins="spark.skins.spark.*"
                                     xmlns:comps="comps.*">
        <fx:Declarations>
            <!-- Remove fontweight="bold" and other styles as you wish
                 Must be a component and not a factory. -->
            <s:Label id="labelDisplay"
                     verticalCenter="1" left="0" right="0" top="0" bottom="0"
                     textAlign="start"
                     verticalAlign="middle"
                     maxDisplayedLines="1"
                     showTruncationTip="true" />
        </fx:Declarations>
    </skins:DefaultGridHeaderRenderer>
    Next, create a simple DataGrid skin by creating a subclass of the  spark.skins.spark.DataGridSkin in MXML and defining a new headerRenderer  component in the fx:Declarations section. Example below (I named it "CustomDataGridSkin"):
    <?xml version="1.0" encoding="utf-8"?>
    <skins:DataGridSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    xmlns:skins="spark.skins.spark.*"
                    xmlns:comps="comps.*">
        <fx:Declarations>
            <!-- Must be a factory with the right id for the skin part -->
            <fx:Component id="headerRenderer">
                <comps:CustomHeaderRenderer />
            </fx:Component>
        </fx:Declarations>
    </skins:DataGridSkin>
    Last, assign your new skin as the skinClass of your DataGrid (either in MXML or as a style):
    <s:DataGrid skinClass="comps.CustomDataGridSkin">
    I know it's not pretty, but it's the result of trading off between having completely custom skinning vs. having knobs to tweak every style. Hope this helps.
    -Kevin

  • Changing RadioButton Label

    I have a RadioButtonGroup with 6 RadioButtons and i would
    like to change the color of the label which the user selects. Is
    there a property/style that i can use to achieve this?
    Thanks...

    Thanks rtalton.. This is exactly what i was looking for. I am
    glad and lucky that my very first post got answered by a real
    guru..
    I begin to understand what you mean when you say user
    interaction is never very simple..
    Earlier, since setting the color property for the RadioButton
    as below seemd to change the label color i thought that setting the
    color property in an event driven function would work.. but it did
    not.. What works is changing the color via setStyle
    <mx:RadioButton x="21" y="139" label="London"
    groupName="AnswersRadioGroup" id="A2" textRollOverColor="#0AF3CA"
    fontSize="12" color="#FFFFFF" iconColor="#0AF3CA" width="250"/>
    Thanks

  • Changing the label of TOC to another language in Captivate 7

    I am using Captivate 7 and created a number of English Projects.  I have translated these English files to French (by exporting/importing captions), changed the voices, etc, etc.  All is now in French in the project except the title of the Table of Contents when enabled.  I have already changed the labels in the table of contents for things such as Slide Title, Duration, etc by creating the TOCStrings.ini file and copying it to my root folder - that works as described in other posts/blogs. However, I am unable to change the Heading/Label of "Table of Contents" to French. 
    Is the TOCStrings.ini file the place to change the label of Table of Contents to French?  If so, what string would I add to the file to make this change happen?
    Can someone please let me know where the change can be made (if not in the TOCStrings.ini) or if the change is even possible? 
    Thank you!

    If you enter data in the Info fields of the TOC, the indicator 'Table of Contents' will automatically be replaced by the Title field.

  • Changing the label of a field in SAP GUI

    Hello SAP Guys,
    I would like to change the label of a field in SAP GUI.
    I already did it internally because for that field the Shor Text of the label changed:
    I went to SE11, and wrote down the appropriate data element, through Translation I changed the entries of SCRTEXT_L, SCRTEXT_M and SCRTEXT_S and activated this change after saving.
    It is very strange that after making sure that the
    Short Text of that field was changed, I went to trx BP and I could see that the label didn´t change.
    I´ll appreciate any help you can give me,
    Regards,
    Efrain

    Hi Efrain,
    Can you tell me in which screen did you make the screen.
    Moreover the changes are not reflected immediately.
    What you can try is to create a new record of the transaction in which you changed the label and save the recore. After this try to close the session and reopen the transaction and this should work.
    The reason is the label on the screen are not picked up from the data element everytime but from buffer. So when you create a record this updates the database table entry and can also refresh the buffer.
    I had the same problem in BP transaction and the above solution worked.
    Let me know if this helps.
    Jash.

  • How to change the label of a total column in pivot view

    Hi
    Is there a way to change the label of the column created by analytics when calculated row based totals? Currently, it is same as the measure label to be summed.
    Thanks

    Hi
    Thanks for your help, actually that option works for the total displayed as the latest row, I mean the label for the total row. However, for the total column, the name stays as the same as the measure label.
    Can you further help me on the issue?
    Thanks

  • When printing mailing labels from Contacts how do I change the label size?

    I want to print mutliple labels from a group in Contacts. I can print 20 labels per page but I want to print 14. I have tried every option in the pop up window but nothing lets me change the label size, 

    Hi 786menzies,
    Welcome to the HP Support forums.  I understand that your print jobs from Photosmart 5520 seems very small.
    The font size is controlled by the software program that the document was created in, for example any Microsoft Word document that you send to the printer the font size would have been chosen in Microsoft Word.  I've included two different documents on how to change the print settings; one for Mac and one for Windows 8.  These documents will show you the process on changing print settings if not the actual steps as you may not be using one of the operating systems mentioned.
    Changing Print Settings in Mac OS X
    Changing Print Settings in Windows 8
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • How to change a labels text which created at runtime?

    hi,
    i am creating label controls in runtime dynamically and adding them to a group component. this group component is in another custom component and i have lots of custom comp. in my app.
    my question is how can access (via id) and change a labels text whict created at runtime?
    i can change like this but i am setting id's and want to reach via id.
    var lbl:mx.controls.Label = mx.controls.Label(subMenu5.group_subMenu5.getElementAt(1));
    lbl.text = "good job";
    thank you, have a good day.

    First off, if you are already using a Spark Group, I would suggest you use a Spark Label instead of an MX Label. If you want to reference the Labels from the group, loop through the group's elements and check the if the element id matches the Label you want to assign text to.
    var lbl:Label;
    var n:int = myGroup.numElements;
    for (var i:int = 0; i < n; i++)
         lbl = myGroup.getElementAt(i) as Label;
         if (lbl && lbl.id == "myLabel")
              lbl.text = "newText";

  • How can I change the label of iCloud mail in Mail?

    I have an iPhone, where the iCloud account in mail is shown as "Name @ iCloud". I've just been setting up a new iPad Air 2 and there in Mail the label shows just as "iCloud". How can I change that label? I've been digging around but haven't found a way.

    Most of us just use names for the folders which seems to work fine unless you're not alphabetically inclined.
    It really doesn't make much difference who else may want a feature like that, it still isn't going to magically appear. If you wish to submit it as a feature request you can do so here: Feedback.
    There aqre third-party programs that may provide a similar function although not colors: DockStar and Mail Badger.

  • How to Change the label names in crmd_order

    HI Experts
    in CRMD_order transaction i want to change the lable names to the following Standard labels is it possible?..
    the standard label names are
    Standard Label name proposed label name
    Sold to Party = XXXXXXXX
    Requester = YYYYYYY
    Change Manager = AAAAAA
    Change Advisory Board= BBBBBBB
    I have found one link in sdn,To change the label Names But I am not able to find data element name.
    Kindly provide me  your valuable guidance on the above issue.
    Thanks in advance
    Thanks & Regards
    Anand

    Hi,
    it looks like you want to change the names of the partner functions.
    You can do this in the customizing, for example using SPROScenario Specific SettingsService Desk-Service Desk--Partner Determination Procedure (This one works for both ChaRM & Service Desk).
    The standard procedure in your case would be SDCR0001.
    The recommended way is to define your own Z partner functions and assign them to your own Z Partner Determination Procedure, which you have to replace in the configuration of your transaction type.
    Regards,
    Christoph

  • Views in MM03, how can I add fields and changes fields labels

    Hi !!
      I need to change some labels that appear on Sales: Sales Org  2 (view on MM03, MM02..MM01)...
       Im not sure what I can do this.. Im an ABAP Programmer(beginner) and I know how I can change labels of fields in programs(reports) that I did...but in This case. I don't know what I can do...
       example: when I enter on MM03..I select differents views(including Sales: Sales Org  2), later I specify  sales Org and distribution Channel (I need to specify this information for see these fields on this TAB Sales: Sales Org  2).
      When I access in tab: Sales: Sales Org  2, I can see one Group that it's called
    Material Groups that contain two fields called MVKE.MVGR1 AND MVKE.MVGR5... I saw in the screen these fields with the description from each field..example:  Material Group 1 (MVKE.MVGR1 )... I would like to know :
    1.- How Can I change the description Material Group 1 (in this screen) by other description (example: material test)...
    2.- How can I add more fields in this group...example..If I need to add MVKE.MVGR2 ..??
      I will appreciate your help!!! 
      I will give you points for your answer
    Alice

    Hi Alice,
    And do I need to change in this section too.... SPRO -> SAP Reference IMG -> Logistics general -> Material master -> configuring the material master -> ...
    If I need to add some values???
    After you made label changes on custom screen then you need to go configuration (Define Structure of Data Screens for Each Screen Sequence) to replace the standard SAP screen with custom screen. You can also do testing for custom subscreen as well.  Give it try.
    And how about If I move this screen??...is it dangerous??...or how can I know if this screen affect other section of programs?
    I do not understand your questions. Can you elaborate more?
    Regards,
    Ferry Lianto

  • How to change a label of User Type in OIM 11g

    How to change a label of User Type in OIM 11g. If we have to change label of First Name or Last name then we can change in User.xml and some in resource properties file but what is the procedure to change for User Type.

    Follow this: http://download.oracle.com/docs/cd/E14571_01/doc.1111/e14309/uicust.htm#BABDEGFE
    i .Copy the $OIM_ORACLE_HOME/server/apps/oim.ear/admin.war/WEB-INF/lib/IdentityTaskFlow.jar to a local work directory, unzip it and locate UserAttributes.properties at /oracle/iam/resources/IdentityTaskFlow.
    ii. Update the userAttributes.properties file in the IdentityTaskFlow.jar/oracle/iam/resources/IdentityTaskFlow and create a new IdentityTaskFlow.jar
    iii. Copy the updated IdentityTaskFlow.jar to $OIM_ORACLE_HOME/ server/apps/oim.ear/admin.war/WEB-INF/lib/
    For "User Type", try putting the property name as "user_type" or try "role". One should work.
    HTH,
    BB

  • How can i change the label of an array controller in the xib file

    I have seven instances of NSArrayController in my main xib file; they are all labled 'Array Controller' and I cannot change the label in the list of objects.  I can change the label in the identity inspector, but the label still remains 'Array Controller' in the list of objects.  If I double-click on the label that is in the list and change the label its value changes in the identity inspector when I tab out of the label field but the label reverts to 'Array Controller' in the list of objects.  I'll never be able to keep the seven controllers straight in my head.  Is there a solution?

    The problem is was in Xcode, while editing the xib file.  After many back and forth jumps (between Xcode and this composer for the discussion) and many attempts to relabel the array controllers over two hours, the changes have appeared just as I want.  I hate it when that happens (who likes egg on their face?)
    I'm sorry for wasting your time.  Thanks for your input.

  • PAGES: How change a Paragraph Style ?

    Hello all,
    there is something that is driving me crazy...
    using Pages for iPad is it possible to change the default settings of a Paragraph Style ?
    I am not talking about importing a document with a custom set of styles but simply:
    - I open my document in Pages for iPad
    - I select a line of text and apply the "Header 1" style to it
    - I am not happy - for example - with the font size of the Header 1 style and I want to make all my Header 1 paragraphs change their font size
    - In the desktop version you would simply change/update the style you need, but on the iPad I cant find a way to change those values
    (BTW, I seem to remember that I once managed to do this...)
    Thanks,

    You seem to be able to copy and paste styles, but nowhere that I can find does it let you update the defined styles.
    There is the manual which does not refer to any suitable method, and also some eBooks on the subject but I have scanned those and can find no reference to redefining styles either.
    The more I play with Pages for iPad the more of a toy it seems. Sort of amazing that it does what it does on a mobile tablet, but when you get right down to it, not very useful.
    Peter

  • Pages for iPad: change a Paragraph Style ?

    Hello all,
    there is something that is driving me crazy...
    using Pages for iPad is it possible to change the default settings of a Paragraph Style ?
    I am not talking about importing a document with a custom set of styles but simply:
    - I open my document in Pages for iPad
    - I select a line of text and apply the "Header 1" style to it
    - I am not happy - for example - with the font size of the Header 1 style and I want to make all my Header 1 paragraphs change their font size
    - In the desktop version you would simply change/update the style you need, but on the iPad I cant find a way to change those values
    (BTW, I seem to remember that I once managed to do this...)
    Thanks,

    You seem to be able to copy and paste styles, but nowhere that I can find does it let you update the defined styles.
    There is the manual which does not refer to any suitable method, and also some eBooks on the subject but I have scanned those and can find no reference to redefining styles either.
    The more I play with Pages for iPad the more of a toy it seems. Sort of amazing that it does what it does on a mobile tablet, but when you get right down to it, not very useful.
    Peter

Maybe you are looking for