Re: [flexcoders] mx:datagrid renderer problem
Seems like the code got distorted when pasting. For the renderer based on DGIR, did you set wordWrap=true on the column? For the two buttons, I would try not overriding the data setter. On 10/16/11 7:09 AM, "Sells, Fred" wrote: I’m using Flex 4 with an mx:datagrid with a value of 40 for row height and drag and drop enabled. I’m having a very hard time getting a custom renderer to work. The layout keeps getting messed up in the grid cell. I really need to be able to diplay two lines in each cell and maybe some color coding of certain text (requirements are evolving). The problem seems to be related to the custom row height. The following works but does not give me two line functionality: … -- the renderer code is-(boilerplate removed fro brevity)- package renderers { ! public class AppointmentRenderer extends DataGridItemRenderer{ public function AppointmentRenderer() { super(); } override public function validateNow():void { if (data==null || data.resident__id=="0") { background = false; this.text = null; this.styleName=""! ; }else{ &! nbsp; this.height=40; // resident" label="aaawidth="100%" height="15" alpha="0.5"/> Then I get a grid that seems has the header and the cells distorted as shown below. Note that each column is a different table (same component) due to drag-n-drop issues and some other parts of the requirements I did not get into. Can anyone give me a clue about what I’m doing wrong? [cid:3401653123_10137632] -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui <>
Re: [flexcoders] Embedded SVG scales like bitmap.
Thanks, that did it! One thing that's a little odd: This compiles: [Embed(source="MyIcon.swf")] public static const MyIcon:Class; but this: import mx.core.MovieClipLoaderAsset; [Embed(source="MyIcon.swf")] public class MyIcon extends MovieClipLoaderAsset { ... gives an "Unable to transcode MyIcon.swf" compiler error. This is not a big deal, I should be able to work around it, but I wonder why I can embed the SVG file in that manner, extending SpriteAsset, but not the SWF. The Flex 3 Developer's guide says that when you embed a SWF file the class created is a subclass of mx.core.MovieClipLoaderAsset. I called describeType with an instancof the the MyIcon class that represented the embedded SWF, and it shows that indeed it is a subclass of MovieClipLoaderAsset. From: Johannes Nel To: flexcoders@yahoogroups.com Sent: Sunday, October 16, 2011 2:39 PM Subject: Re: [flexcoders] Embedded SVG scales like bitmap. export it as a swf On Sun, Oct 16, 2011 at 6:46 PM, Dave Glasser wrote: > >I drew a simple irregular polygon in Adobe Illustrator and saved it as an SVG. >I embedded it in my Flex app as a SpriteAsset. I then set it as the skin (all >states) for a button. When I set the button size much larger than the original >size of the SVG (approx 75X75 pixels), the sides of the polygon show severe >stair-stepping. Is there anything I can do to make it behave like a scalable >vector graphic in my application, rather than a lo-res embedded bitmap? > -- j:pn \\no comment
Re: [flexcoders] Embedded SVG scales like bitmap.
export it as a swf On Sun, Oct 16, 2011 at 6:46 PM, Dave Glasser wrote: > ** > > > I drew a simple irregular polygon in Adobe Illustrator and saved it as an > SVG. I embedded it in my Flex app as a SpriteAsset. I then set it as the > skin (all states) for a button. When I set the button size much larger than > the original size of the SVG (approx 75X75 pixels), the sides of the polygon > show severe stair-stepping. Is there anything I can do to make it behave > like a scalable vector graphic in my application, rather than a lo-res > embedded bitmap? > > > -- j:pn \\no comment
[flexcoders] Embedded SVG scales like bitmap.
I drew a simple irregular polygon in Adobe Illustrator and saved it as an SVG. I embedded it in my Flex app as a SpriteAsset. I then set it as the skin (all states) for a button. When I set the button size much larger than the original size of the SVG (approx 75X75 pixels), the sides of the polygon show severe stair-stepping. Is there anything I can do to make it behave like a scalable vector graphic in my application, rather than a lo-res embedded bitmap?
[flexcoders] systematic way to expand an XML node programmatically
Hello folks, i have an array that contains the exact node to be expanded. How do i use this to open that same node in the dataProvider? this array is some kind of location where the node to be expanded is compared with the dataProvider as the dataProvider is traversed. Anyone knows how best to do this?
[flexcoders] mx:datagrid renderer problem
I'm using Flex 4 with an mx:datagrid with a value of 40 for row height and drag and drop enabled. I'm having a very hard time getting a custom renderer to work. The layout keeps getting messed up in the grid cell. I really need to be able to diplay two lines in each cell and maybe some color coding of certain text (requirements are evolving). The problem seems to be related to the custom row height. The following works but does not give me two line functionality: ... -- the renderer code is-(boilerplate removed fro brevity)- package renderers { public class AppointmentRenderer extends DataGridItemRenderer{ public function AppointmentRenderer() { super(); } override public function validateNow():void { if (data==null || data.resident__id=="0") { background = false; this.text = null; this.styleName=""; }else{ this.height=40; // http://ns.adobe.com/mxml/2009"; xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" backgroundAlpha="1.0" height="40" horizontalAlign="center" verticalAlign="top" verticalGap paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0"> Then I get a grid that seems has the header and the cells distorted as shown below. Note that each column is a different table (same component) due to drag-n-drop issues and some other parts of the requirements I did not get into. Can anyone give me a clue about what I'm doing wrong? <>