flex4

Display HTML text in the Spark TextArea

寵の児 提交于 2019-12-23 19:25:28
问题 The Below code is running well... <?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" > <fx:Declarations> <mx:HTTPService id="httpRSS" url="http://www.petefreitag.com/rss/" resultFormat="object" /> </fx:Declarations> <s:Panel id="reader" title="Blog Reader" width="500"> <mx:DataGrid width="485" id="entries" dataProvider="{httpRSS.lastResult.rss.channel.item}" click=

Is there a way to subclass and override a method that is in a custom namespace?

蓝咒 提交于 2019-12-23 18:04:27
问题 Say I have a class with a method defined in a namespace other than public, protected or internal... package com.foo.bar { import com.foo.my_name_space public class bar { private var _vabc:String private var _v123:String protected function set123(val:String):void{ _v123 = val; } my_name_space function setABC(val:String):void{ _vabc = val; } } } Now I want to extend and override this in a subclass... package com.foo { import com.foo.bar.bar import com.foo.my_name_space public class foo extends

How to disable automatic sorting in Editable Datagrid in Flex 4

不打扰是莪最后的温柔 提交于 2019-12-23 17:29:46
问题 I have an editable datagrid. If sorting is applied by clicking any header of datagrid, it works fine. But after that, if data values are changed in any row of datagrid, sorting is applied automatically. How to prevent from this behaviour? i.e. sorting should only be applied if user clicks on any header of datagrid and sorting should not be applied when user modifies data in grid. 回答1: You have to set sortableColumns to false and handle the headerRelease event, where you do the sorting

Flex 4 spark Panel has an ugly gray top part

[亡魂溺海] 提交于 2019-12-23 12:08:08
问题 I have a Flex 4 spark Panel I'm popping up through the PopUpManager, but it has a gray portion at the top I can't get rid of. What is that and how can I remove it? UPDATE : An example Panel is below. I simply call PopUpManager.addPopUp(new TestPanel(), background, true); on it and receive that solid gray bar above the button. <s:Panel xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fx="http://ns.adobe.com/mxml/2009" dropShadowVisible="false" backgroundAlpha="0" controlBarVisible="false"

How do you remove the border of a Flex 4 TextArea Component (spark themed halo)

允我心安 提交于 2019-12-23 10:53:02
问题 With the Flex 3 SDK you simply needed to set the borderThickness style to 0, or set borderStyle to none. With the Flex 4 SDK ad the Spark theme, this has no effect. 回答1: Try something like: borderVisible="false" 回答2: If you want to remove the border from spark TextArea's here are some ways to do so: To make all spark TextAreas have no border you can do this: s|TextArea { borderVisible : false; } You can also make a simple style and only apply them to specific spark TextAreas like so:

In flex, is there a way to capture and optionally cancel a row selection event in a DataGrid?

假如想象 提交于 2019-12-22 23:00:34
问题 This should be trivial, but I can't seem to figure out a way to do this. I have a DataGrid, and what I would like to do, is when a user clicks on a row to select it, check a certain condition, and if it's met prevent the row from getting selected and keep the old selection intact. Thanks! 回答1: I didn't test it, but it should work using event.preventDefault() and/or event.stopImmediatePropagation() on the GridSelectionEvent.SELECTION_CHANGING event. //stupid function but used for example

In flex, is there a way to capture and optionally cancel a row selection event in a DataGrid?

我的未来我决定 提交于 2019-12-22 23:00:27
问题 This should be trivial, but I can't seem to figure out a way to do this. I have a DataGrid, and what I would like to do, is when a user clicks on a row to select it, check a certain condition, and if it's met prevent the row from getting selected and keep the old selection intact. Thanks! 回答1: I didn't test it, but it should work using event.preventDefault() and/or event.stopImmediatePropagation() on the GridSelectionEvent.SELECTION_CHANGING event. //stupid function but used for example

Trying to use BindingUtils in Flash AS3.0

穿精又带淫゛_ 提交于 2019-12-22 19:43:25
问题 I am not able to make this code work in AS3.0 ( Flash ) with Flex SDK 4.0 included. import mx.binding.utils.*; [Bindable] var myValue:int = 0; var cw:ChangeWatcher = BindingUtils.bindSetter(myValueChanged, this, "myValue"); addEventListener( Event.ENTER_FRAME , ef); function ef(e:Event):void { trace("hello",getTimer()); myValue = getTimer(); } function myValueChanged(o:Object):void { trace("myValue: " + myValue.toString()); } The output i get is : myValue: 0 hello 157 hello 168 hello 171

Trying to use BindingUtils in Flash AS3.0

若如初见. 提交于 2019-12-22 19:43:11
问题 I am not able to make this code work in AS3.0 ( Flash ) with Flex SDK 4.0 included. import mx.binding.utils.*; [Bindable] var myValue:int = 0; var cw:ChangeWatcher = BindingUtils.bindSetter(myValueChanged, this, "myValue"); addEventListener( Event.ENTER_FRAME , ef); function ef(e:Event):void { trace("hello",getTimer()); myValue = getTimer(); } function myValueChanged(o:Object):void { trace("myValue: " + myValue.toString()); } The output i get is : myValue: 0 hello 157 hello 168 hello 171

Difference between validateProperties() and invalidateProperties()

余生长醉 提交于 2019-12-22 13:57:21
问题 Can any one tell me about what is the Difference between validateProperties() and invalidateProperties() ? 回答1: invalidateProperties: Marks a component so that its commitProperties() method gets called during a later screen update. Invalidation is a useful mechanism for eliminating duplicate work by delaying processing of changes to a component until a later screen update. For example, if you want to change the text color and size, it would be wasteful to update the color immediately after