(URGENT) Skining of components (datagrid & combobox) problem

Hello

I m using FLASH CS3, I used a Datagrid and Combobox components Panel and just add data inside that.

setupComboBox();
function setupComboBox (): void
{
cb.setSize (200, 22);
CB.prompt = "select a credit card;
cb.addItem ({label: "MasterCard", data: 1});
cb.addItem ({label: 'Visa', data: 2});
cb.addItem ({label: "American Express", data: 3});

}
Import fl.controls.DataGrid;
Import fl.controls.dataGridClasses.DataGridColumn;
Import fl.data.DataProvider;
import fl.events.DataGridEvent

var dp:DataProvider = new DataProvider();
dp.addItem ({col1: "1.A", col2: "point 1.B", col3: "point 1.C"});
dp.addItem ({col1: "item 2.A", col2: "point 2.B", col3: "item 2.C"});
dp.addItem ({col1: "item 3", col2: "point 3.B", col3: "item 3.C"});
dp.addItem ({col1: "point 4.A", col2: "item 4.B", col3: "item 4.C"});
myDataGrid.addColumn ("col1");
myDataGrid.addColumn ("col2");
myDataGrid.addColumn ("col3");
myDataGrid.dataProvider = dp;
myDataGrid.setSize (300, 200);
myDataGrid.move (10, 10);

It seems to work very well.

My problem is, I want two different types of skining of two different (DataGrid & Combobox) components. in the same fla.

.. for example, if the datagrid control have the type of skin color gray and combobox have skin color black type.

Can someone has an idea?

I also tried like this

cb.setStyle ("upSkin", CellRenderer_upSkin2)

It should be more like:

cb.dropdown.setRendererStyle("upSkin", CellRenderer_upSkin2);

Tags: Adobe Animate

Similar Questions

  • URGENT... Driver video problem Check

    140105 URGENT...  Driver video problem Check
     
    (will take other ideas on what to do for video problem)
    performance of device drivers fix security
     
    my video seems to be a xp machine.
    When restoring from my pc to an earlier date, it seemed to alleviate the problem.
    When I boot in safe mode, I have a video perfect (with the exception of the size of the objects).
    When I reboot, screens of washing washing & microsoft come up, when get to xp blue light / logon screen it goes black.

    What is this 'supposed' to have a problem with?
     
    is there a way to get a proper driver download?
    and: is there a utility to repair the files without destroying the data...
    Thank you

    have: windows xp3 sp3, viewsonic va800 monitor

    I went to the site of the Lim.  think that was part of the problem with saw to no support.  sent them an email / current.

    check microsoft to the drivers FRO viewsonic va800, except if someone can help with a good method of downloading drivers before hand.

    Hi Dave,.
    I could be wrong, but "Viewsonic va800" resembles a monitor?  I think that you need to update the drivers for your graphics card.  In Device Manager, look at "Graphics cards" (that's what they are called in Windows7, could be something different in xp...).

    Take a look at this site for more information: http://pcsupport.about.com/od/fixtheproblem/ht/updatedriverxp.htm

    Because every PC is different (a different material) you're not going to find specific instructions, I'm afraid).

    Hope that helps.
    See you soon
    Rich

  • Tab doesn't work does not correctly for Datagrid ComboBox ItemEditor

    When you run the app type a1 in the discovery of an App combo box and then type the tab key.

    Click the 3rd row in the column as Bs and show a combobox.

    Type a3 and her and then press ENTER.  Note that the A3 is saved under the selected and recorded on the dataprovider element

    Press the return key back key and press ENTER.  Note that the null value is saved and that nothing is selected.

    Type a3 again and press ENTER.

    Hit of the new backspce, but this time typing the tab key.  Note that the previous value is returned.  Oops.

    {Code}

    <? XML version = "1.0" encoding = "utf-8"? >

    "" < s:Application 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:vo = "valueObjects.*".

    Width = "100%" height = "100%" >

    < fx:Script >

    <! [CDATA]

    Import mx.collections.ArrayCollection;

    Import mx.events.FlexEvent;

    protected function aCBLabel(item:Object):String

    {

    If (item! = null)

    Return item.name;

    on the other

    Return ' ';

    }

    protected function bDG_creationCompleteHandler(event:FlexEvent):void

    {

    bDG.selectedIndex = 0;

    }

    protected function bAFormat(item:Object,_column:DataGridColumn):String

    {

    If (item [column.dataField]! = null)

    return item [column.dataField] .name;

    on the other

    Return ' ';

    }

    []] >

    < / fx:Script >

    < fx:Declarations >

    < vo: ADto id = "aDto" / >

    < vo: BDto id = "bDto" / >

    < s:ArrayCollection id = "aList" >

    < vo: ADto >

    < vo: id > 1 < / vo: id >

    < name: vo > a1 < / vo: name >

    < vo: bs >

    < vo: BDto >

    < vo: id > 1 < / vo: id >

    < vo: aDto >

    < vo: ADto >

    < vo: id > 1 < / vo: id >

    < name: vo > a1 < / vo: name >

    < / vo: ADto >

    < / vo: aDto >

    < / vo: BDto >

    < vo: BDto >

    < vo: id > 2 < / vo: id >

    < vo: aDto >

    < vo: ADto >

    < vo: id > 2 < / vo: id >

    A2 < vo: name > < / vo: name >

    < / vo: ADto >

    < / vo: aDto >

    < / vo: BDto >

    < vo: BDto >

    < vo: id > 0 < / vo: id >

    < / vo: BDto >

    < / vo: bs >

    < / vo: ADto >

    < vo: ADto >

    < vo: id > 2 < / vo: id >

    A2 < vo: name > < / vo: name >

    < vo: bs >

    < vo: BDto >

    < vo: id > 3 < / vo: id >

    < vo: aDto >

    < vo: ADto >

    < vo: id > 3 < / vo: id >

    < name: vo > a3 < / vo: name >

    < / vo: ADto >

    < / vo: aDto >

    < / vo: BDto >

    < vo: BDto >

    < vo: id > 0 < / vo: id >

    < / vo: BDto >

    < / vo: bs >

    < / vo: ADto >

    < / s:ArrayCollection >

    < s:ArrayCollection id = "Ballista" >

    < vo: ADto >

    < vo: id > 1 < / vo: id >

    < name: vo > a1 < / vo: name >

    < / vo: ADto >

    < vo: ADto >

    < vo: id > 2 < / vo: id >

    A2 < vo: name > < / vo: name >

    < / vo: ADto >

    < vo: ADto >

    < vo: id > 3 < / vo: id >

    < name: vo > a3 < / vo: name >

    < / vo: ADto >

    < / s:ArrayCollection >

    < / fx:Declarations >

    < source = fx:Binding "aCB.selectedItem as ADto" destination = "aDto" / > "

    < s:Form id = "AForm" width = "700" height = "170" >

    < s:layout >

    < s:BasicLayout / >

    < / s:layout >

    < s:HGroup x = "0" y = "50" width = "670" height = "60" >

    < s:Label height = "25" fontWeight = "bold" = "find a" verticalAlign = "middle" / >

    < s:ComboBox id = "aCB".

    prompt = "enter or select a name.

    labelFunction = "aCBLabel."

    x = "110" y = "10" width = "375" >

    < mx:ArrayCollection id = list "asList" = "{aList}" / >

    < / s:ComboBox >

    < / s:HGroup >

    < / s:Form >

    < mx:DataGrid id = "bDG" x = "10" y = "140" width = "450" height = "200".

    Editable = "true".

    dataProvider = "{aDto.bs}" "

    creationComplete = "bDG_creationCompleteHandler (event)" >

    < mx:columns >

    < mx:DataGridColumn id = "bidDC".

    headerText = "id".

    Editable = "true".

    dataField = "id".

    editorDataField = 'value '.

    Width = "50" / >

    < mx:DataGridColumn id = "bNameDC".

    headerText = "Like Bs"

    Editable = "true".

    dataField = "aDto.

    labelFunction = "bAFormat."

    editorDataField = 'value '.

    Width = "150" >

    < mx:itemEditor >

    < fx:Component >

    < s:MXDataGridItemRenderer implements = "mx.managers.IFocusManagerComponent" >

    < fx:Script >

    <! [CDATA]

    Import mx.collections.ArrayCollection;

    Import mx.controls.dataGridClasses.DataGridListData;

    Import mx.controls.listClasses.BaseListData;

    Import mx.events.FlexEvent;

    Import spark.events.DropDownEvent;

    Import spark.events.IndexChangeEvent;

    [Bindable]

    public var down: ArrayCollection;

    protected function cb_InitializeHandler(event:FlexEvent):void

    {

    Low = outerDocument.bAList;

    aDto = outerDocument.bDG.selectedItem.aDto;

    If (aDto! = null)

    {

    var t:ADto;

    for (var i: int = 0; i < bAs.length; i ++)

    {

    t = low [i];

    If (aDto.id is t.id)

    {

    cb.selectedIndex = i;

    break;

    }

    }

    }

    }

    override public function setFocus (): void

    {

    cb.setFocus ();

    }

    public function get value (): ADto

    {

    If (cb.isDropDownOpen)

    cb.closeDropDown (true);

    cb.validateNow ();

    aDto = cb.selectedItem as ADto;

    return aDto

    }

    protected function cb_closeHandler(event:DropDownEvent):void

    {

    aDto = cb.selectedItem as ADto;

    }

    []] >

    < / fx:Script >

    < fx:Declarations >

    < vo: ADto id = "aDto" / >

    <! - Place non-visual elements (e.g., services, items of value) here - >

    < / fx:Declarations >

    < s:ComboBox id = "cb".

    Width = '100% '.

    prompt = "{aDto.Name}" "

    dataProvider = "low" {} ".

    labelField = 'name '.

    Initialize = "cb_InitializeHandler (Event)" "

    Close = "cb_closeHandler (Event)" >

    < / s:ComboBox >

    < / s:MXDataGridItemRenderer >

    < / fx:Component >

    < / mx:itemEditor >

    < / mx:DataGridColumn >

    < / mx:columns >

    < / mx:DataGrid >

    < / s:Application >

    {Code}

    {Code}

    package valueObjects

    {

    import com.adobe.fiber.services.IFiberManagingService;

    import com.adobe.fiber.valueobjects.IValueObject;

    Import mx.collections.ArrayCollection;

    Import valueObjects.BDto;

    import com.adobe.fiber.core.model_internal;

    Using namespace model_internal;

    public class com.adobe.fiber.valueobjects.IValueObject implements ADto

    {

    private var _internal_id: int;

    private var _internal_name: String;

    private var _internal_bs: ArrayCollection collection;

    model_internal var _internal_bs_leaf:valueObjects.BDto;

    public void ADto()

    {

    }

    public function get id(): int

    {

    Return _internal_id;

    }

    public function get name(): String

    {

    Return _internal_name;

    }

    public function get bs(): ArrayCollection collection

    {

    Return _internal_bs;

    }

    public function set id(value:int): void

    {

    var oldValue:int = _internal_id;

    If (oldValue! == value)

    {

    _internal_id = value;

    }

    }

    public function set name(value:String): void

    {

    var oldValue:String = _internal_name;

    If (oldValue! == value)

    {

    _internal_name = value;

    }

    }

    public function set bs(value:*): void

    {

    var oldValue:ArrayCollection = _internal_bs;

    If (oldValue! == value)

    {

    If (value is ArrayCollection collection)

    {

    _internal_bs = value;

    }

    else if (value is table)

    {

    _internal_bs = new ArrayCollection (value);

    }

    else if (value == null)

    {

    _internal_bs = null;

    }

    on the other

    {

    throw new Error ("value of bs should be a collection");

    }

    }

    }

    private var _managingService:com.adobe.fiber.services.IFiberManagingService;

    public function set managingService(managingService:com.adobe.fiber.services.IFiberManagi_ngService):void

    {

    _managingService = managingService;

    }

    }

    }

    {Code}

    {Code}

    package valueObjects

    {

    import com.adobe.fiber.core.model_internal;

    import com.adobe.fiber.services.IFiberManagingService;

    import com.adobe.fiber.valueobjects.IValueObject;

    Import valueObjects.ADto;

    Import mx.collections.ArrayCollection;

    Using namespace model_internal;

    public class com.adobe.fiber.valueobjects.IValueObject implements BDto

    {

    private var _internal_id: int;

    private var _internal_aDto: ADto;

    private static var emptyArray:Array = new Array();

    public void BDto()

    {

    _internal_id = 0;

    }

    public function get id(): int

    {

    Return _internal_id;

    }

    public function get aDto(): ADto

    {

    Return _internal_aDto;

    }

    public function set id(value:int): void

    {

    var oldValue:int = _internal_id;

    If (oldValue! == value)

    {

    _internal_id = value;

    }

    }

    public function set aDto(value:ADto): void

    {

    var oldValue:ADto = _internal_aDto;

    If (oldValue! == value)

    {

    _internal_aDto = value;

    }

    }

    private var _managingService:com.adobe.fiber.services.IFiberManagingService;

    public function set managingService(managingService:com.adobe.fiber.services.IFiberManagi_ngService):void

    {

    _managingService = managingService;

    }

    }

    }

    {Code}

    the tab wasn't working because because he wasn't changing the selection and just leave the drop-down list box.  For example, in the value of the Add function if (cb.textInput.text == "") cb.selectedIndex = - 1;  This will change the selection as you wish and solve the problem.

  • T괥 DataGrid rendering problems

    I am creating an its DataGrid with a TextInput to filter the column grid. The custom converter has simply a label (with the label column heading), then a text input, and it's all AS, implementation of IFactory, etc.. It is rendered very well.

    The problem is with the filtering - at first, I tried to just add the area of text, but as soon as I typed anything in it, the filtering logic (which must call dataProvider.refresh () to refresh the dataGrid control) caused the header be re-instantiated, thereby disabling the filter text input field. Later, I worked around this by implementing caching TextInput objects elsewhere and have the header just addChild on them.

    However, the question is still in the way. The ses is reinstantiates twice by call to refresh(), leading them to blink, and if the user types too fast, he throws a RTE because components have not been instantiated yet.

    Is there a way to stop this incessant re-initialization of the its? It does not seem necessary or effective. If anyone knows or wants to help I would be very grateful. Thank you!

    This may be caused by the TextInput event that you use to call the filtering method. Are you call your method of filtering of the change of the TextInput event, perhaps? If so, each typed character will call the filter method. Call your method of filtering the valueCommit event and see if that helps.

    Put a break on the first line of your filter method, debug the application, start typing in the TextInput and watch what happens. If the filter method is called several times, this could be the problem.

    Make sure that you do not call the method of filter until typing is done.

  • Custom ComboBox problem

    Hello

    I'm doing a custom combobox. I don't want pictures in that text. Inspired by DDImagesButton I coded my Combobox. But am experiencing a few problems with it.

    For the button, I created TextButtonField. Problem that I face this is it shows text only when you click on it once. Otherwise, it shows just background color. Here's the code for TextbuttonField:

    public class TextButtonField extends ButtonField implements FocusChangeListener {
        protected DropdownItem mItem;
        boolean mTextItem;
        int mWidth;
        int mHeight;
        private static final int FOCUS_COLOR_BORDER = Color.RED; //0xFC0000;
        private static final int UNFOCUS_COLOR_BORDER = Color.WHITE;
        private int borderColor = FOCUS_COLOR_BORDER;
        private int color;
        private boolean selected;
    
        public TextButtonField(String text) {
            this(new DropdownItem(null, text), true);
        }
    
        private TextButtonField(DropdownItem item, boolean textItem) {
            super(item.mName, CONSUME_CLICK);
            mItem = item;
            mTextItem = textItem; 
    
            mWidth = (mTextItem ? getFont().getAdvance(mItem.mName) + 6 : 0);
            mHeight = getFont().getAscent() + 6; 
    
            // Save the Width & Height for layout
            mItem.itemWidth = mWidth;
            mItem.itemHeight = mHeight;
    
            setPadding(3, 6, 3, 6);
            setMargin(0, 0, 0, 0);
            this.setBackground(BackgroundFactory.createSolidBackground(Color.RED));
            setBorder(BorderFactory.createSimpleBorder(new XYEdges(0, 0, 0, 0), Border.STYLE_TRANSPARENT));
            setBorder(VISUAL_STATE_ACTIVE, BorderFactory.createSimpleBorder(new XYEdges(0, 0, 0, 0), Border.STYLE_FILLED));
            setFocusListener(this);
        } 
    
        public TextButtonField(String text, int bgColor) {
            this(new DropdownItem(null,text), true);
            this.setBackground(BackgroundFactory.createSolidBackground(bgColor));
        }
    
        protected void paint(Graphics graphics) {
            super.paint(graphics);
        } 
    
        public int getPreferredWidth() {
            return mWidth;
        } 
    
        public int getPreferredHeight() {
            return mHeight;
        } 
    
        protected void layout(int width, int height) {
            setExtent(mWidth, mHeight);
        } 
    
       public void focusChanged(Field field, int eventType) {
            if (eventType == FocusChangeListener.FOCUS_GAINED) {
                borderColor = FOCUS_COLOR_BORDER;
                invalidate();
            }
            if (eventType == FocusChangeListener.FOCUS_LOST) {
                borderColor = UNFOCUS_COLOR_BORDER;
                invalidate();
            }
        }
    
        protected void drawFocus(Graphics g, boolean on) {
            paint(g);
        }
    }
    

    By using this class, I created the ComboBox class such as:

    public class ComboBox extends TextButtonField implements FieldChangeListener {
        DropdownItem[] mItems;
        int mIndex;
        boolean showSelectedText;
        private int maxTextInd =0;
    
        public ComboBox(DropdownItem items[]) {
            super(items[0].mName);
            mItems = items;
            updateIndex(0);
            setChangeListener(this);
        }
    
        public ComboBox(DropdownItem items[], int bgColor) {
            super(items[0].mName, bgColor);
            mItems = items;
            updateIndex(0);
            setChangeListener(this);
        }
    
        protected void paint(Graphics graphics) {
            super.paint(graphics); 
    
            int x = 0;
            int ht =  0;
            x = this.getFont().getAdvance(mItems[maxTextInd].mName) + 5;
    
            int y = 5; 
    
            int y1 = y;
            int y2 = y + 10;
            int x1 = x;
            int x2 = x + 18;
            int[] xPts = new int[] { x1, x2, x1 + 9 };
            int[] yPts = new int[] { y1, y1, y2 };
            graphics.drawFilledPath(xPts, yPts, null, null);
        } 
    
        public void fieldChanged(Field f, int context) {
            getScreen().getUiEngine().pushScreen(new ComboPopUp());
        }
    
        public void updateIndex(int index) {
            mIndex = index;
            mItem = mItems[mIndex];
            invalidate();
        }
    
        public int getSelectedIndex() {
            return mIndex;
        }
        public String getSelectedItem() {
            return mItems[mIndex].mName;
        }
    
        class ComboPopUp extends PopupScreen implements FieldChangeListener {
            public ComboPopUp() {
                super(new VerticalFieldManager(VERTICAL_SCROLL | VERTICAL_SCROLLBAR));
                for (int i = 0; i < mItems.length; i++) {
                    TextButtonField button = new TextButtonField(mItems[i].mName);
                    add(button);
                    button.setChangeListener(this);
                }
                getField(mIndex).setFocus();
            } 
    
            protected boolean keyChar(char key, int status, int time) {
                if (Keypad.KEY_ESCAPE == key) {
                    this.close();
                    return true;
                } else
                    return super.keyChar(key, status, time);
            } 
    
            public void fieldChanged(Field field, int context) {
                updateIndex(getFieldWithFocusIndex());
                this.close();
            }
        }
    }
    

    * Here if the index is changed, I want to see the ot the button of the selected index. I want to say that if I have 2 items in the drop-down list 'Save' & 'Edit', Save is 1 then it will be displayed, if I select "Edit" then change must be considered over the top and not save. This time is seen as st element.

    * In DDImagesButton, next to the button, the triangle is hsown, which indicates a drop down, here how can I show that. In DDImagesButton, I have not found where and what show this triangle.

    * The popup is displayed correctly, but the text is not displayed until the component is selected. This issue will be resolved when TextButtonField problem is solved.

    Although these 2 problems are a little different but as relate to them, I added in the same message.

    Can you help me to solve my problems and help me create the custom drop-down list box. Help is highly appreciated.

    Thank you

    Hi Piotr,

    Consideirng your instructions, I tried to implement and make changes accordingly, but nothing has worked... I knew that both the setBorder is necessary. For ascent, creaed a label with alphabet 'W' and I am for his ascension.

    By developing, I realized the problem and resolved completely. In fact, I've been putting the text of the TextButtonField in super(), I removed that and displays text in object. It also helped me view the drop-down arrow that was not coming. I changed the following code and little bit here & there, and things were as expected.

    private TextButtonField(DropdownItem item, boolean textItem) {
            super(CONSUME_CLICK);
            ..........
     }
    
        protected void paint(Graphics graphics) {
            super.paint(graphics);
            graphics.setColor(Color.WHITE);
            graphics.setFont(textFont);
            graphics.drawText(mItem.mName, XPad, 1);
        }
    

    The drop down menu is not visible completely because of the size of the layout. Changed the width of TextButtonField in ComboBox object after showing the arrow that is:

    totWidth = x 2;

    and layout() TextButtonField:

    Protected Sub layout (int width, int height) {}
    setExtent (Math.max (mWidth, totWidth), mHeight);
    }

    That's all, and my work is done. Above code is added with explanation so can serve to someone else like me.

    Thank you

  • Create custom components: lack of problem MovieClip

    Hi guys,.

    I've been creating reusable components customized for a while now, but have noticed a problem with one of my components.

    I have two Clips that represent the status of a phone operator, I want to be able to be styled individually; unavailable, available. The two video clips are found in component assets/_private folder in the library, as well as a container that I use for positioning and swapping/addChild/removeChild every two clips. The bin is emptied when the component is loaded, and then depending on the update settings, the relevant clip is loaded in it, using the AS3 class file.

    Now on the real state of the component I have positioned available clip, and one not available does not exist on the stage.

    When I create the hold and run the MXI to package the component in a distributable ZXP file unavailable clip seems to disappear from the packaging.

    Each video clip in the library needs to exist on the stage so that it can be included in the package? Or I can specify which elements should be included.

    Would be great for this answer! Because it is a very confusing subject!

    I have all of the CBC can send on request, cannot appear to download here.

    Concerning

    Charlie

    OK, I found how to fix this.

    All clips must be placed on the stage in one way or another, either inside the container movieclip (should be deleted on common language runtime) or you can simply place all movieclips on the 2nd picture of a layer on the component, as it is disabled when the component is run.

    Hope this helps anyone else having this problem

  • Dynamic dataProvider in Datagrid combobox.

    Hello

    I'm using Flex 3. I have a DataGrid with the first two lines, with an element converters like ComboBoxes. I want to set up is that, according to my selected in the combobox of first, second respective combobox must get a dataprovider of my choice.

    For example

    If I select the 1 combobox as the India, then the adjacent combobox should have cities in India.

    If I select the 1 combobox as the France, the adjacent combobox should have cities in France.

    I don't have the values in local variables. Values should be captured during execution, because the list of countries (in the first combobox) is very comprehensive in order to fetch the list of all the cities for all countries wouldn't be fair. So for each selection of country, I have to call an http service to retrieve the list of corresponding cities.

    My question is how can I dynamically give cities such as dataprovider to each of the combo boxes to each line.

    Hope that my description is quite understandable.

    Thank you

    SID.

    Hello

    You can check the code below. If this is what you need.


    http://www.Adobe.com/2006/mxml '.
    Layout = "vertical".
    creationComplete = "application1_initializeHandler (event)" > "
        
             Import mx.collections.ArrayCollection;
    Import mx.events.FlexEvent;
               
               
    Sets your collections
    [Bindable]
    public var countriesData:ArrayCollection = new collection ArrayCollection ([{label: "India"}, {label: 'Brazil'}]);
    [Bindable]
    public var citiesData:ArrayCollection;
    [Bindable]
    public var collection: collection ArrayCollection = new ArrayCollection();

    protected function application1_initializeHandler(event:FlexEvent):void
    {
    dataGrid.addEventListener ("countryChanged", country_changed_handler);
                    
    collection.addItem({cityData:citiesData});)
    }

    Override this method the remote calls.
    In the resultEvent, you will modify the citiesData collection.
    protected function country_changed_handler(event:DataEvent):void
    {
    If (event.data is "India")
    {
    dataGrid.selectedItem.cityData = new collection ArrayCollection ([{label: "Bombay"}, {label: "Delhi"}]);
    }
    on the other
    {
    dataGrid.selectedItem.cityData = new collection ArrayCollection ([{label: "São Paulo"}, {label: "Rio de Janeiro'"}]);
    }
    dataGrid.invalidateList ();
    }
               
    public void addRow(event:MouseEvent):void {}
    collection.addItem (new Object());
    collection.addItem({cityData:citiesData});)
    }
    public void dropRow(event:MouseEvent):void {}
                   
    }
    ]]>
        


    dataProvider = "{collection}" >
            
                
                    
                        
                            
    labelField = "label".

    change = "combobox1_changeHandler (Event)" "
    selectedIndex = "-1" >
                                
                                     Import mx.collections.ArrayCollection;
    Import mx.events.ListEvent;

    protected function combobox1_changeHandler(event:ListEvent):void
    {
    dispatchEvent (new DataEvent ("countryChanged", true, true, this.selectedLabel));
    }
    ]]>
                                
                            
                        
                    
                
                
                    
                        
                            

                                
                                     override public function set data(value:Object):void
    {
    Super.Data = value;
    var prevSelectedItem:Object = this.selectedItem;
    this.dataProvider = data.cityData;
    this.selectedItem = prevSelectedItem;
    }
    ]]>
                                

                            
                        
                    
                
            
        
        
            
            
        

  • DataGrid editable problems LabelFunction

    Hello

    I have problems with a datagrid with editable columns and labelFunctions.

    The problem is that when I leave the field editable by a path that wasn't with the escape key, the datagrid again apply the labelFunction and destroy the formattion number adding a lot of numbers.

    When the field is full of 0000,00 it only adds zeros, like 0.000.000,0000 and continue after doing the same process.

    When the field contains a nonzero number, he applies the labelFunction and after he removed the labelFunction. After several times it just make the issue disappear and the cell is empty.

    I have read the documentation on the modification of cells and tried to implement a solution to prevent the cell to be edited, without success.

    The source code is attached for some advice on my problem.

    Thanks, Fredy.

    You may need to call destroyItemEditor when you call preventDefault()

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • ItemEditor DataGrid Combobox dynamically created in as.

    I am trying to create a line editor for cell of a datagrid created dynamically from the metadata of an API call. Depending on the type of data, I'm specifying itemEditors on columns. I could do this as well on all other types of data that I need, except for the Comboboxes, because they have custom attributes that are specific to each column (values in drop-down list). These values are also loaded via an API call.

    My question is, given that the data type of dataGridColum.itemEditor is a ClassFactory, which means that I can't pass an instance of a ComboBox (what makes the presence since the grid reuses editors) how can I dynamically specify, using ActionScript code, what are the possible values of the combobox?

    Any suggestions are most appreciated. All the examples I found were in MXML and statically populated. Thank you!

    Wow, after 2 days of playing with it, it took an hour after you posted this to understand these 3 lines...

  • XML to the combobox problem

    I am fill combobox from xml file, right

    My case: I'm reading the xml file that look like this

    < Download >
    < pallets >
    < pal30 name = "First map" >
    map1.XML < color > < / color >
    < / pal30 >
    < pal20 name = 'Second map' >
    map2.XML < color > < / color >
    < / pal20 >
    < / pallets >
    < / upload >

    by
    < mx:XML format = "e4x" id = "mapp" source="Database/Map.xml"/ >
    < mx:ComboBox = "263" x = "10" width = "194".
    ID = "myCb" enabled = "true".
    dataProvider = "{mapp.". Upload.palettes.*.@name} ">"
    < / mx:ComboBox >

    So, what I try to do is when I click on "Foreground" my ComboBox, I want to have 'map1.xml' 'printed' in a mx:Text control

    I can get the attribute name in the box by < mx:Text text = "{myCb.selectedItem}" / > that might be in this case 'Foreground' and I want to have 'map1.xml' when I click on 'First map' in the combobox.

    Do I have to create a kind of out of my xml file where values are tied together as
    {name: 'Foreground', file:"map1.xml'}



    The problem is that your nodes are not always named. If you had and then you could set the dataProvider = "{mapp.pal}" and labelField="@name" then the selectedItem.colors would be what you want. "

    When you used the expression you have created an array of values name only - there is no context longer. Try this instead:

    In a Script block:

    private void paletteName (point: Object): String
    {
    .@name XML (element) return;
    }

    private function test (event: Event): void
    {
    output. Text = XML (event.target.selectedItem). * Colors;
    }

    Now the selectedItem will be the XML for a node pal so XML (selectedItem). * Colors will be map1.xml or map2.xml.

  • ComboBox problem?

    Hi all

    I have a requirement that I have a combobox control and that combobox size wil be dynamically depending on the width of the selected child in the combobox... initially it will show the length of the strings element in the list...Issue.JPG

    That is the question... I want combobox width will increase accordingly with a maximum width of list in the combobox...


    If you add effects to it I will thankful to you...

    Thank you

    RAM

    Try this.

     private function comboBox_changeHandler(event:ListEvent):void{     comboBox.width = comboBox.measureText(comboBox.selectedLabel).width + 40;}
    
  • Width of the ComboBox problem

    Hello:

    I have a window of fixed size that is used by the application. This popup has a combobox to a fixed width. But the length of the label in the box data is longer than the width, so data are always hidden. for example, say my width of the combobox is set to 250, but the width of the label in the combobox control could sometimes be 500. How can I view the full label with more bandwidth, keeping the width real combobox to 250?

    Thanks in advance.

    KM

    For mx:ComboBox, the value dropDownWidth = '500 '.

  • Urgent: ODC scan of hard drive problem

    Hi guys,.

    I am facing a problem when using Capture of Document Oracle for the analysis of a disk file.
    I installed it correctly and the configuration is done also.

    While im by clicking on the icon "_Batch Scanning_", then click on '_begin Scanning_' open the file source and im by selecting a JPEG or TIFF the message tht file get popping up is * "" 4515 ERROR: the file ~ filepath ~ is not a valid Image "." *

    Pls help me, if you know and never faced the same problem.

    Thanks in advance
    Sunil

    Published by: user10450506 on April 20, 2010 16:58

    Hello

    1. try using a different picture than the one you are currently using. It seems that the image you are using does not match the type of image that you have set up in type of scan profile.

    2. just try to change the file type, color, compression of the image scan profile format to match the type of image you are using.

    3. If this does not work, re-install the ODC (after erasing the previous registry entries) without spaces in the path of installation as Capture of C:/Program Files/documents /. Select the location as C:/DocumentCapture no spaces.

    Thank you
    RAM

  • Director + flash combobox problem...

    Hello

    I'm doing an animation flash with combobox, and I write this code:

    function fun() {}
    Deger = comboBox.selectedItem.data;
    getURL ("event: a" + deger);
    }
    comboBox.addEventListener ('change', fun);


    and the Director, I write this in moviecode:

    global secim

    on of deger
    Secim = string (David)
    end

    but 'secim' does not change when one choose any item in combobox... What can I do?

    thaks Rob, yes there be help... :D

  • BlackBerry smartphones URGENT! I have a serious problem with the update to version 7.1 blackberry bold 9900! :(

    Hi all! Starting yesterday I did the software upgrade to version 7.1 (I had 7.0) and since yesterday my bold 9900 is locked at 17% on social RSS!

    I don't know what to do! I tried to connect the phone to the PC via the blackberry desktop software, it seems to connect at the beginning but after awhile the Blackberry Desktop Sowtfare is blocked and it restart the update up to 17% 'social RSS feeds... "

    I also tried to remove the battery, but when I put the battery back, updating block again to 17% social RSS... help me please! I'm really desperate!

    airelav1988 wrote:

    Hi all! Starting yesterday I did the software upgrade to version 7.1 (I had 7.0) and since yesterday my bold 9900 is locked at 17% on social RSS!

    I don't know what to do! I tried to connect the phone to the PC via the blackberry desktop software, it seems to connect at the beginning but after awhile the Blackberry Desktop Sowtfare is blocked and it restart the update up to 17% 'social RSS feeds... "

    I also tried to remove the battery, but when I put the battery back, updating block again to 17% social RSS... help me please! I'm really desperate!

    Hello airelav1988,

    Please see this link. http://supportforums.BlackBerry.com/T5/BlackBerry-Curve/9360-update-its-been-froze-on-7-all-day/m-p/...

    Thank you.

Maybe you are looking for