Flex :: Setting Multiple Styles To A Custom LabelItemRenderer?

Nov 19, 2011

I made a custom LabelItemRenderer, inside it I want to give some additional style to a StyleableTextField. How can I do it without losing inherited styles? I tried different things, but always got an error saying antiAliasType must be set.

s|List.customListStyle
{
fontFamily: Arial;

[Code].....

How should I set my text field style, and then set it in the createChildren method?

View 1 Replies


Similar Posts:


Css :: Setting Different Chart DataTip Styles In Flex Components

Nov 1, 2011

I have a following issue:My task is to style a datatip for two charts in Flex 4.5.Both charts reside in two different <Group> based components which are added to the <Application>

So after a thorough research here is what I tried to do.First applying a css descending selectors:

#container#chart1 chartClasses|DataTip{
backgroundColor:white;
backgroundAlpha:0.01;

[Code]....


Then I would like to be able to get access to the instance of the CustomDataTip class.But I can't .So currently the only thing I can do is to create a distinct custom datatip renderer class for each chart.That could be fine if you have only a couple of charts you want to style but what can we do if we have many of them?

View 1 Replies

Flex :: Custom ItemRenderer Does Not Use Styles Specified

Mar 18, 2010

I have a custom item renderer which I use for my DataGrid. The DataGrid has specified selectionColor, rollOverColor and themeColor. The Problem is that the custom item renderer, does ignore those colors, and doesn't give any Feedback...

I tried to add the lines:
setStyle("selectionColor", 0xEDF1F7);
setStyle("rollOverColor", 0xE1F5DE);
setStyle("themeColor", 0x3569B0);
But with no effect...

View 1 Replies

Flex :: Applying Styles For Custom TextArea?

Apr 5, 2010

I have the following code to create and apply a few styles for a custom TextArea in ActionScript 3.

public class MyCustomTextArea extends TextArea
{
override protected function createChildren():void
{

[code]....

I have two problems with this code.this.styleSheet is always null when I create an instance of the class. If this.styleSheet is initialized to new StyleSheet() to avoid this issue, then the TextArea instance does not seem to recognize any of the HTML tags that can be used with the htmlText property.

View 1 Replies

Flex :: Using LabelItemRenderer For Word Wrap Overflowing Text?

Feb 16, 2012

How can I set up the LabelItemRenderer or use any other item renderer that wouldn't truncate the overflowing text but would word wrap it? [URL]

View 1 Replies

ActionScript 2.0 :: Custom Styles For A List Box?

Dec 8, 2006

how to change the look of an MX 2004 List component? It took me 3 hours just to learn how to change the colors of the list, but I see no way to change the look of the scrollers or drag bar. I need to make everything other than the scroll arrows a pale purple color (basically, rendering them invisible): 0x99889B [URL]

View 2 Replies

Flex :: Setting Content Area In Custom Component?

Dec 11, 2009

I am trying to define the content area of a custom component that extends mx:VBox. The component has predefined headers and footers (visual children) and I want to set the area in the middle for adding children to the component. The component will be used like this:

<custom_component>
<mx:button/>
</custom_component>

How would I set this content area?

View 3 Replies

Flex :: Setting Up Content Children For Custom Mxml Component

Dec 9, 2009

I am trying to develop a custom component to act as a divider.

[Code]....

I would like to use this component to assign objects like this:

[Code]...

Unfortunately, this does not work. I get a compiler error saying: In initializer for 'left': multiple initializer values for target type mx.containers.Canvas.

View 1 Replies

Actionscript 3 :: Setting A Default Skin For A Custom Component In Flex 4?

Aug 18, 2010

How do you set the default value of skinClass for a custom component in Flex? I've extended the DropDownList with my custom component, but I would like to specify a default skin to go with it instead of always setting the skinClass value for each instance.

View 1 Replies

ActionScript 1/2 :: Set Multiple Styles On A Tree Component?

Jun 7, 2009

i wanted to know hot do i set multiple styles on e tree component using actionscript2.0. i need to change color, font size and font weight.

View 1 Replies

Flex :: Setting A Custom ItemRenderer In A ComboBox On Specific List Items After Combobox Creation?

Nov 8, 2010

I'm trying to set a specific list item in a mx combobox to have a custom item renderer, the problem is that I cannot do this via mxml, it needs to be done via actionscript at a later stage, eg: combobox gets created, combobox gets populated, user does other tasks, combobox needs to set one or more items in the combobox to have icons (via item renderer)..

I can do this via the onChange event, but it only applies the icon when the combobox is opened and there is a slight delay so you can see the icon being added.

View 1 Replies

Flex :: Play Multiple Sounds With A Custom Delay?

Dec 9, 2009

I need to realize a multiple-track player. The user can upload multiple tracks and mix (play them together). My problem is to allow the user to define an exact start position of each track to allow a synchronization between them, something like this:

Track 1: start at [x] sec.
Track 2: start at [y] sec.
play/stop

where the user can set the x and y. I've tried to realize it with AS2 (using netstream and setInterval) and AS3 (using netstream or sound and timer). Only if I set the same x and y both tracks are playing simultaneously.

View 1 Replies

ActionScript :: Custom Flex/ UIComponent Keeps Getting Painted Multiple Times During A Resize?

Nov 19, 2010

I've created a custom uicomponent and whenever the browser or its specific container is resized, a repaint occurs but the contents of the component get drawn again and again and again...So, if I move the container I'll end up with multiple circles drawn on top of each other but offset depending upon where the container is when the repaint occurs.My updateDisplayList code is below.Do I need to do some sort of clear so that it doesn't contiuously getting duplicated like this?

override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
trace("height: " + parent.height);
trace("width: " + parent.width);

[code].....

View 1 Replies

Flex :: 4 - Multiple Instances Of A Custom Component Listening The Same Event Of A Parent

Jan 28, 2011

In short: I need an event listener in a custom component so all its instances (without editing them) react at the same time, fired by a dispatched event in its parent container. In detail: I have a custom component with Tab navigator. (The tabs are intended to show different preferences for different Languages.) I have a button bar with buttons for all the languages. There are a lot of instances of the custom component.

I want to click in a button of the languages bar and get ALL the instances switched to the same tab (the custom component contains the logic to change the tab). I can do it by adding the event listener for EACH INSTANCE of the custom component, so it calls an internal function that changes the tab. But it seems to be very coupled, isn't it? I wonder if it can be done in the master CLASS of the component, so it listen for events in its parent container, whichever it is. In my mind this code shoud work, but it doesn't (obviously ill'use a custom event to pass the new language value): this.parent.addEventListener("lang_change", this.change_tab); This way I can just drop an instance of the component, and see it working for itself.

View 2 Replies

Flex :: Usage Of Custom Event With Properties... Multiple Events And Single Listener?

Jan 6, 2010

I have multiple items in my app that I would like the user to click on.Some items are completely different classes.The classes dispatch events and then when the events are captured, some modifications are done to the transform properties of a loosely coupled display object.I want two separate classes to dispatch the same type of event, since I already have an image class that draws images based on a given url... I want the classes to dispatch the events, but then I think I want the difference to be detected when the event comes along... i.e., I would like to recognize the 'origin' or 'sub-type' of the event. Some sort of if/then logic would suffice.

View 1 Replies

Flex :: How Does A Component Know Whether One Of Its Styles Got Changed

Jun 26, 2009

I inherited a custom component from TextField. The component needs to know when any of its styles got changed at runtime via setStyle. How would I do that? It's probably obvious but I couldn't find an event or appropriate method to override.

View 2 Replies

Flex :: How To Change Component Styles In AS3

Nov 4, 2009

In MXML, there is a Button class which you can instantiate like so:
<mx:Button id="something />
But what if you wanted to dynamically build this in AS3 and add it to the Flex app dynamically, without the use of components (just AS3) and then modify Flex's styles, for example, here you access the Button's properties and set them:

var btn:Button = new Button();
btn.height = 50;
btn.width = 75;
btn.x = 100;
btn.y = 40;

But how would you go about changing the Style, for example:
btn.downSkin = "something";
btn.color = "0xfffff";

I'm sort of starting to lean towards making a flex component in MXMLand than just making it visible true/false, but I like the fact that i create an object in AS3 and then destroy it when I don't need it anymore, than create it again once needed.

View 2 Replies

Overridden Styles For Flex Module?

Jun 11, 2009

Can a flex module have styles different from the main application which loads the modules? Meaning... can I have a main set of styles for the application, and separate styles for each module.. with each of them rendering their own styles without disturbing the other at runtime?

My specific case:The main application is developed by me... and the modules are developed by different people who want to contribute to the main application. I want to provide some way for each of the module developers to have their own styles for their modules, without touching the main application or its styles.

View 2 Replies

Actionscript 3 :: Flex 4 Disptaching Custom Event From Custom Component (why Flex Converting Custom Event To Mouseevent)?

Mar 2, 2012

This is NOT duplicate of my earlier post (its is slightly different)But this is similar issue with similar error but its not the same error The error I am getting now is below while dispatching the custom event from my custom component

TypeError: Error #1034: Type Coercion failed: cannot convert events::MapEvent@a74ab51 to flash.events.MouseEvent.
dispatchEvent(new MapEvent(MapEvent.CLICKED_ON_MAP));

Note: The error in my earlier post is giving below error message

Type Coercion failed: cannot convert flash.events::Event@81ecb79 to com.events.ShopEvent

The difference here are two things, the earlier error is while converting flash event to custom event and now this one is while converting custom event to flash event and secondly, I have no clue why it is trying to convert to the mouseevent where I am just dispatching my custom event with proper listeners.

This is my custome event

package events
{
import flash.events.Event;
import ui.map.MapElement;

[code]...

View 1 Replies

Flex :: Applying Dynamic Styles To Skins

Dec 24, 2009

I want to be able to style or set properties dynamically.[code]I want to be able to set these properties in the skin so the skin can be styled differently for each component that uses it.

View 1 Replies

Actionscript 3 :: Styles That Are Not Found In Flex Documentation?

Jan 9, 2010

today I wanted to change the border color of TextInput when user has a focus on it. I could not find any style that would allow me to change thatlittle bit of Google searching and I found answer to be themeColor.Why is it that there are some styles that work and which are not even mentioned in the Flex documentation? (and how can one find out about em, except doing some web searching?)

View 2 Replies

Flex :: Modules Does Not Inherit Css Styles When Built With Ant

Nov 26, 2010

I'm creating a Flex 4 application which contains different modules in it. The main application contains a style sheet and the modules inherit the styles defined in this file.Its working fine when the swf's are generated using Flash Builder. But when I'm generating it using Ant script, the modules does not inherit the styles and everything looks weird.I added isolate-styles="false" as an additional parameter to mxmlc, but still its not working.

View 2 Replies

Flex :: Customization - Use Different Skins For Different Components Or To Use Just One Big Css That Has All The Styles Together?

Aug 11, 2011

When you have a flex project, is it better to use different skins for different components or to use just one big css that has all the styles together?

View 1 Replies

Flex :: Handling TextInput Element Width And Styles In AS3

Nov 10, 2009

I made a Form container with few TextInput fields in Flex and I would like to change a style of clicked TextInput element. I managed to do it with MouseEvent.CLICK event listener but it is not what I expected. I would like to change style of TextInput when user try to edit that field. However, I want to change back to 'default' style when user clicks another TextInput field or outside any field. Is there some event listener made specific for such interactions? I have also a question, is it possible to make width of TextInput depending on amount of text? I mean to resize it to width of text inside of it? Text comes from some database and is always different widths...

View 2 Replies

Actionscript 3 :: Flex Datagrid.tooltip With Different Text Styles?

Apr 11, 2010

I have a tooltip for each datagrid row. Which is fine. I also can style it with with mx:Style which is great.However, I desire to have multiple styles ie a header and the rest of the text in the tooltip.

View 1 Replies

Flex :: Current Theme Spark Styles Not Working

May 2, 2011

I am trying to figure out why I am getting an error when using the chromeColor (or other spark style related items):
<s:Button x="10" y="208" label="CALL" width="185" fontWeight="bold" id="bCall" chromeColor="#F90000"/>

This is the error:
The style 'chromeColor' is only supported by type 'spark.components.Button' with the theme(s) 'spark'.

Yet in project - properties, the theme is set to Spark. I also tried setting it to Halo and then back to Spark. Here is my app definition:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="800" minHeight="600" width="100%" height="100%">

I have seen references that define the mx namespace as "xmlns:mx="library://ns.adobe.com/flex/halo", but then my mx components break (TabNavigator for example) - not sure if that would fix it anyway. I is using flex 4.1 library (I believe the project was originally created when flex builder was at 4.0 if that matters).

No other libraries included.
Project - properties is set to MX+Spark.

Also, if I remove that chromeColor, the project compiles, BUT there are warnings such as: The style 'borderAlpha' is only supported by type 'spark.components.TitleWindow' with the theme(s) 'spark'. Flex Problem (and others - borderColor, cornerRadius, dropShadowVisible).

View 2 Replies

Android :: Flex Styles Not Loaded At Runtime In Devices

Dec 8, 2011

I want to load my styles (in swf format) at run time for my flex mobile application. For that requirement, I have compiled my css files into swf format and I loaded for my application using "StyleManager.loadStyleDeclarations("style.swf");". I get my styles for application when I run it on my desktop, but after building my files into apk format, I couldn't get the styles applied for my application in device. When I debug my application from my android device, I got the following error message.

Error: Unable to load style(RSL app:/framework_4.5.1.21328.swz failed to load. Error #2032: Stream Error. URL: app:/framework_4.5.1.21328.swz): style.swf. at Function/<anonymous>()[E:dev4.5.1frameworksprojectsframeworksrcmxstylesStyleManagerImpl.as:1551]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
[Code] .....

View 1 Replies

ActionScript 3.0 :: Flex Load Styles From Css File At Run Time?

Oct 22, 2009

I am trying to load different styles at run time. In my css files there is only description of the Application tag. If I point to the file in my mxml code: Code:<mx:Style source="name_of_the_file.css"/> it is working. The problem is that I don't know how to do this with as3. I have managed to load datawiththis:Code:StyleManager.loadStyleDeclarations( 'name_of_the_file.swf' ); My question is how I can load not swf but .css file like in the example above.

View 2 Replies

ActionScript 3.0 :: Custom Component Inspector Not Setting?

Apr 21, 2009

i never use compenents, and was recently asked to build one. Ha. Anyway, i have a working class that does all i expect, however, when transforming the class to a component, i am having trouble getting the inspector to actually 'set' the variables. below is a very general idea of what i am doing. All the variables show in the spector, but only the default values are working at runtime.

[Code]...

View 2 Replies

ActionScript 3.0 :: Setting Custom Font TLF Text

Mar 7, 2011

How can I set a custom font while creating a link with TLF text? Here is my code:

[Code]...

Everything works fine but I would like to use:

- Helvetica Neue Bold as my custom font
- Add tracking or letter spacing
- Embed the font in my swf

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved