[flexcoders] make image sepia in flex
Hello, we are building an image editing tool in flex. Any suggestions or ideas on how to build a filter to make an image sepia ? Thanks a lot!
[flexcoders] Re: Barcode scanning with pda (MC50 for instance)
Hello, I've seen the webcam barcode example, but that uses a real webcam, and that is not the correct solution for my project as the Symbol MC50 has a built in laser barcodereader. So that should be far more accurate to use ... Any ideas on where to find more info on how to build and use the RTMP solution ? I guess I would have to build a .NET application for Windows Pocket PC to do the barcode reading and talk to that from the Flex application. Other question, any experience with flex app on Windows Pocket ? Thanks for any more suggestions ... Any one interested in doing the coding for this ? Best regards, Frank --- In flexcoders@yahoogroups.com, Clint Modien [EMAIL PROTECTED] wrote: Sounds like a fun little project... what programming language were you thinking of using for interfacing with the Symbol scanner? I'm guessing you don't care about web security as this sounds like it's a local application so you'll be able to create a socket connection to a program listening on socket service running on the local pc. I believe if you run the swf locally, execute it from file:c/// or http://localhost, you'll be able to connect to a local service without further client side configuration. There are actually a few ways to do this. 1. Binary Sockets 2. XML Sockets 3. A local RTMP service. 4. AMF polling Option 3 is by far the best and for that there a few options for you. 1. Red5 - Java 2. WebORB - .NET 3. FDS Express - Java You could also technically use an AMF solution and polling but you'd definately lose points on the coolness factor. I'd want the bi-di communication that RTMP offers for interfacing with a device. My gut tells me that it would be easier to program against an RTMP service than to use AMF and polling. (You won't have to manage a stack in the service code.) You're probably locked into using symbol scanners... but I remembered Renaun did some really kewl stuff with a webcam barcode reader you may also want to have a peak @... as a kewl alternative... http://renaun.com/blog/?p=33 On 5/29/07, amigo_fd [EMAIL PROTECTED] wrote: Hello, any ideas on how to communicate with the built in barcode scanner on a device like the Symbol MC50 ? I know the scanner returns just text, so that's ok, but how to start/stop the scanning ? best regards, Frank
[flexcoders] Barcode scanning with pda (MC50 for instance)
Hello, any ideas on how to communicate with the built in barcode scanner on a device like the Symbol MC50 ? I know the scanner returns just text, so that's ok, but how to start/stop the scanning ? best regards, Frank
[flexcoders] convert result from webservice to use in bytearray en uncompress
Hello, I'm testing some compression systems to make my webservice results smaller. Now I have a webservice with the following action: input = test output = base64BinaryK0ktLgEA/base64Binary How can I uncompress this result in Flex ? This code gives the error: Parameter bytes must be non-null. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private function LoadWebservices():void { WsTest.WsTestZippedString.arguments = {doString: tiText.text }; WsTest.WsTestZippedString.send(); } private function FillResult(): void { var x:XML = new XML(WsTest.WsTestZippedString.lastResult); //CommonFunctions.showErrorDialog(x.children()); tiResult.text = x.toString(); var byteArr:ByteArray = new ByteArray(); byteArr.writeBytes(x.toString() as ByteArray); byteArr.uncompress(); tiUnzipped.text = byteArr.toString(); } ]] /mx:Script mx:WebService id=WsTest destination=WsTest wsdl=http://xxx.yyy.zzz/ws_test.asmx?wsdl; useProxy=false showBusyCursor=true mx:operation name=WsTestZippedString result=FillResult(); / /mx:WebService mx:TextInput x=45 y=41 id=tiText/ mx:Button x=228 y=41 label=Send click=LoadWebservices(); / mx:TextInput x=45 y=71 id=tiResult/ mx:TextInput x=45 y=101 id=tiUnzipped/ /mx:Application
[flexcoders] zip/unzip xml webservice result
Hello, Any suggestions/ideas on how to zip a (xml-)string result of a webservice with ASP.NET2 C# and most importantly how to unzip in Flex ? I know Flex Dataservice has a built in system for this, but it's just too expensive ... For zipping in the webservice, I was thinking of using SharpZipLib (http://community.sharpdevelop.net/forums/12/ShowForum.aspx). I already used this for an other webservice where I had to zip many jpeg-images into one file. So with some trial-and-error I think I must succeed in zipping my xml-string to be a much smaller result. Or are there any other ideas out there ? But the main problem is: how will I be able to unzip my webservice-result in Flex ? Now I work with my xml-string result in this way: var x:XML = new XML(myWebservice.myWebserviceFunction.lastResult); myDatagrid.dataProvider = new XMLListCollection(x.children()); So I guess I would have to do something like: var x:XML = new XML(UNZIP(myWebservice.myWebserviceFunction.lastResult)); myDatagrid.dataProvider = new XMLListCollection(x.children()); Any ideas on how we can do this ? Many thanks in advance ! Frank
[flexcoders] Re: sort datagridcolumn on numeric field - use sortCompareFunction ?
Solution found ! example and code on http://flextricks.wordpress.com/2007/02/03/sorting-numeric-values-in-a-flex-datagrid/ --- In flexcoders@yahoogroups.com, amigo_fd [EMAIL PROTECTED] wrote: any ideas on how to do this with sortCompareFunction ? --- In flexcoders@yahoogroups.com, amigo_fd frank@ wrote: Hello, it looks like all data in a datagrid is treated as text. So if you sort a column with only numeric fields it is sorted on the value of the textual contect, instead of the numeric value, like this: 1095 111 1276 144 ... I already converted my webservice-result to numbers at loading, but sorting keeps using text-value ... How to change this ? dgInvoiceListGrouped.dataProvider = new XMLListCollection(x.children()); var GroupedArray:Array = []; for (var j:Number = 0; j dgInvoiceList.dataProvider.length; j++) { GroupedArray[j] = {Name: dgInvoiceListGrouped.dataProvider.getItemAt(j).Name.toString(), Country: dgInvoiceListGrouped.dataProvider.getItemAt(j).Country.toString(), GroupedTotalExcl: Number(dgInvoiceListGrouped.dataProvider.getItemAt(j).GroupedTotalExcl.toString()), GroupedTotalIncl: Number(dgInvoiceListGrouped.dataProvider.getItemAt(j).GroupedTotalIncl.toString())}; } dgInvoiceListGrouped.dataProvider = []; dgInvoiceListGrouped.dataProvider = GroupedArray;
[flexcoders] Re: scrollToIndex just won't work ... any workarounds ?
found a solution: dg.validateNow() blog-example with and without the validate are available here: http://flextricks.wordpress.com/ --- In flexcoders@yahoogroups.com, amigo_fd [EMAIL PROTECTED] wrote: Hello, Any ideas why scrollToIndex won't work ? Tried it on a tilelist, datagrid, ... all without any result. Not even an error message ! This works, as the last item is selected in the tilelist: tlProductsSearchResults.selectedIndex = tlProductsSearchResults.dataProvider.length - 1; But this one doesn't do a thing: tlProductsSearchResults.scrollToIndex(tlProductsSearchResults.dataProvider.length - 1); Best regards, Frank
[flexcoders] clickable functions in flex builder ? how to do that
Hello, yesterday at a flex demo someone clicked on a function to get flex to open that part of the code. Any idea how to do that ? Change setting somewhere ? Forgot to ask yesterday ...
[flexcoders] scrollToIndex just won't work ... any workarounds ?
Hello, Any ideas why scrollToIndex won't work ? Tried it on a tilelist, datagrid, ... all without any result. Not even an error message ! This works, as the last item is selected in the tilelist: tlProductsSearchResults.selectedIndex = tlProductsSearchResults.dataProvider.length - 1; But this one doesn't do a thing: tlProductsSearchResults.scrollToIndex(tlProductsSearchResults.dataProvider.length - 1); Best regards, Frank
[flexcoders] Re: sort datagridcolumn on numeric field - use sortCompareFunction ?
any ideas on how to do this with sortCompareFunction ? --- In flexcoders@yahoogroups.com, amigo_fd [EMAIL PROTECTED] wrote: Hello, it looks like all data in a datagrid is treated as text. So if you sort a column with only numeric fields it is sorted on the value of the textual contect, instead of the numeric value, like this: 1095 111 1276 144 ... I already converted my webservice-result to numbers at loading, but sorting keeps using text-value ... How to change this ? dgInvoiceListGrouped.dataProvider = new XMLListCollection(x.children()); var GroupedArray:Array = []; for (var j:Number = 0; j dgInvoiceList.dataProvider.length; j++) { GroupedArray[j] = {Name: dgInvoiceListGrouped.dataProvider.getItemAt(j).Name.toString(), Country: dgInvoiceListGrouped.dataProvider.getItemAt(j).Country.toString(), GroupedTotalExcl: Number(dgInvoiceListGrouped.dataProvider.getItemAt(j).GroupedTotalExcl.toString()), GroupedTotalIncl: Number(dgInvoiceListGrouped.dataProvider.getItemAt(j).GroupedTotalIncl.toString())}; } dgInvoiceListGrouped.dataProvider = []; dgInvoiceListGrouped.dataProvider = GroupedArray;
[flexcoders] sort datagridcolumn on numeric field
Hello, it looks like all data in a datagrid is treated as text. So if you sort a column with only numeric fields it is sorted on the value of the textual contect, instead of the numeric value, like this: 1095 111 1276 144 ... I already converted my webservice-result to numbers at loading, but sorting keeps using text-value ... How to change this ? dgInvoiceListGrouped.dataProvider = new XMLListCollection(x.children()); var GroupedArray:Array = []; for (var j:Number = 0; j dgInvoiceList.dataProvider.length; j++) { GroupedArray[j] = {Name: dgInvoiceListGrouped.dataProvider.getItemAt(j).Name.toString(), Country: dgInvoiceListGrouped.dataProvider.getItemAt(j).Country.toString(), GroupedTotalExcl: Number(dgInvoiceListGrouped.dataProvider.getItemAt(j).GroupedTotalExcl.toString()), GroupedTotalIncl: Number(dgInvoiceListGrouped.dataProvider.getItemAt(j).GroupedTotalIncl.toString())}; } dgInvoiceListGrouped.dataProvider = []; dgInvoiceListGrouped.dataProvider = GroupedArray;
[flexcoders] Re: image flickers when not found
No the image does not exist in some cases. So I would nee some kind of http-return-status to check what's happening. And replace the image source to notfound.jpg for instance. --- In flexcoders@yahoogroups.com, Jim Robson [EMAIL PROTECTED] wrote: Hey, Do the images exist in your file system? In other words, is Flex failing to find images that actually exist? If so, could the problem be that LoadImage() is sometimes invoked before the data is loaded? -Jim --- In flexcoders@yahoogroups.com, amigo_fd frank@ wrote: Hello, I use a renderer to include an image in a grid. But some of the images don't exist, and then they keep flickering. Some stroboscopic strange effect. Any idea how I can detect if the image could load and prevent the strange effect ? This is the code of my renderer. ?xml version=1.0? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalAlign=center verticalGap=0 borderStyle=none mx:Script ![CDATA[ private function LoadImage():void { if (data != null) { ProductImage.source = ImageBaseUrl + 60/ + data.prodcode + .jpg; } } ]] /mx:Script mx:Image id=ProductImage height=60 render=LoadImage(); scaleContent=false/ /mx:VBox
[flexcoders] Re: datagrid doesn't scroll to selectedIndex
also tried to work with verticalScrollPosition and scrollToIndex but doesn't seem to work. Maybe I need to use some kind of refresh first ? Does this exist for a datagrid ? --- In flexcoders@yahoogroups.com, amigo_fd [EMAIL PROTECTED] wrote: Hello, I can set the selectedIndex to the correct row, but if that row is not in the visible area, the datagrid should scroll to that row. How can this be done ? Now I use this code to set the selected row to the desired one: var SelectedProductIndex:int = 0; private function FillDatagridSearchresult(): void { var x:XML = new XML(WsProducts.WsFindProductsImport.lastResult); datagridProducts.dataProvider = new XMLListCollection(x.children()); if (SelectedProductIndex (datagridProducts.dataProvider.length - 1)) { SelectedProductIndex = datagridProducts.dataProvider.length - 1; } datagridProducts.selectedIndex = SelectedProductIndex; }
[flexcoders] image flickers when not found
Hello, I use a renderer to include an image in a grid. But some of the images don't exist, and then they keep flickering. Some stroboscopic strange effect. Any idea how I can detect if the image could load and prevent the strange effect ? This is the code of my renderer. ?xml version=1.0? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalAlign=center verticalGap=0 borderStyle=none mx:Script ![CDATA[ private function LoadImage():void { if (data != null) { ProductImage.source = ImageBaseUrl + 60/ + data.prodcode + .jpg; } } ]] /mx:Script mx:Image id=ProductImage height=60 render=LoadImage(); scaleContent=false/ /mx:VBox
[flexcoders] datagrid doesn't scroll to selectedIndex
Hello, I can set the selectedIndex to the correct row, but if that row is not in the visible area, the datagrid should scroll to that row. How can this be done ? Now I use this code to set the selected row to the desired one: var SelectedProductIndex:int = 0; private function FillDatagridSearchresult(): void { var x:XML = new XML(WsProducts.WsFindProductsImport.lastResult); datagridProducts.dataProvider = new XMLListCollection(x.children()); if (SelectedProductIndex (datagridProducts.dataProvider.length - 1)) { SelectedProductIndex = datagridProducts.dataProvider.length - 1; } datagridProducts.selectedIndex = SelectedProductIndex; }
[flexcoders] compress/decompress webservice result
Any ideas or suggestion on how to compress data returned from a webservice and decompress it in Flex ? My webservices are build with ASP.NET C# No speed problem when on the local network, but remote offices have to wait a bit for larger results ... Thanks, Frank -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] building project slow on vpn network
Hello, I'm working from home with vpn to the office. My flex-project is on a shared directory on the office-server and I'm working on this files with colleges at the office. So files have to be on the server. I already changed my build folder to a local folder on my own harddisk, but building still takes a long time (especially creating output folder each time). Any ideas on how to speed it up ? Thanks, Frank -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: writing and using classes
Thanks a lot, Mike used public static function String2Date and CommonFunctions.String2Date(...) I'm a search-trialanderror-and-search-again type of programmer. Just learning as I need something :-) Any suggestions on good OO-related basic learning sites ? --- In flexcoders@yahoogroups.com, Michael Labriola [EMAIL PROTECTED] wrote: Frank, I think you might be approaching this from the wrong perspective. In particular, if you don't have object oriented programming experience, you may want to take a few minutes and read some of the many tutorials available online. As Flex is a pretty OO heavy environment, without this knowledge, I think you are going to get stuck on a lot of issues. That said, you have two choices in the code you wrote below: You could make your method static: public function String2Date becomes- public static function String2Date Then you could access it as: dfShipping.selectedDate = CommonFunctions.String2Date(x.result[0].shipdatum[0].toString()); Or you need to create an instance of this class first. var cf:CommonFunctions = new CommonFunctions(); dfShipping.selectedDate = cf.String2Date(x.result[0].shipdatum[0].toString()); I do encourage you to spend a little time reading about Object Oriented programming, either from an Adobe resource or just an online tutorial. It will help you immensly. --Mike --- In flexcoders@yahoogroups.com, amigo_fd frank@ wrote: Hello, I want to make a class with a function I want to reuse in my application. This is new for me, so I need some help ... I've created a file CommonFunctions.as in the root of my application with this code: package { public class CommonFunctions { public function String2Date(doString:String):Date { var doYear:int = Number(doString.substr(0,4)); var doMonth:int = Number(doString.substr(5,2)); var doDay:int = Number(doString.substr(8,2)); var doHour:int = Number(doString.substr(11,2)); var doMin:int = Number(doString.substr(14,2)); var doSec:int = Number(doString.substr(17,2)); var myDate:Date = new Date(doYear, doMonth, doDay, doHour, doMin, doSec); // showErrorDialog(doString + + + doYear + + + doMonth + + + doDay + + + doHour + + + doMin + + + doSec); return myDate; } } } Now, how do I use in it on an other mxml-file in that application ? This does not work: dfShipping.selectedDate = String2Date(x.result[0].shipdatum[0].toString()); Thanks a lot, Frank -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] writing and using classes
Hello, I want to make a class with a function I want to reuse in my application. This is new for me, so I need some help ... I've created a file CommonFunctions.as in the root of my application with this code: package { public class CommonFunctions { public function String2Date(doString:String):Date { var doYear:int = Number(doString.substr(0,4)); var doMonth:int = Number(doString.substr(5,2)); var doDay:int = Number(doString.substr(8,2)); var doHour:int = Number(doString.substr(11,2)); var doMin:int = Number(doString.substr(14,2)); var doSec:int = Number(doString.substr(17,2)); var myDate:Date = new Date(doYear, doMonth, doDay, doHour, doMin, doSec); // showErrorDialog(doString + + + doYear + + + doMonth + + + doDay + + + doHour + + + doMin + + + doSec); return myDate; } } } Now, how do I use in it on an other mxml-file in that application ? This does not work: dfShipping.selectedDate = String2Date(x.result[0].shipdatum[0].toString()); Thanks a lot, Frank -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: load date for DateField from database in correct format
Ok, wrote a simple solution myself for a string in this format: -mm-dd hh:mm:ss public function String2Date(doString:String):Date { var doYear:int = Number(doString.substr(0,4)); var doMonth:int = Number(doString.substr(5,2)); var doDay:int = Number(doString.substr(8,2)); var doHour:int = Number(doString.substr(11,2)); var doMin:int = Number(doString.substr(14,2)); var doSec:int = Number(doString.substr(17,2)); var myDate:Date = new Date(doYear, doMonth, doDay, doHour, doMin, doSec); return myDate; } --- In flexcoders@yahoogroups.com, Michael Labriola [EMAIL PROTECTED] wrote: Frank, The problem is that the dateField is looking for a Flex Date object. Guessing from the conversion to XML, the x.result[0].arrivaldate[0] is an XML node which contains a String. This String needs to be made into a Flex Date Object. There are a few ways to do this: var myDate:Date = new Date( y, m, d, h, m, s ); and parse it manually. Many people have spun there own code to do this, however, this might also be a resource for you: http://labs.adobe.com/wiki/index.php/ActionScript_3:resources:apis:libraries There are a few methods in DateUtil for parsing a string into dates. --Mike --- In flexcoders@yahoogroups.com, amigo_fd frank@ wrote: Hello, I have a webservice which loads from a database with ASP.NET C#. Dates are converted into the following format: ToString(/MM/dd HH:mm:ss) For instance: 2002/09/01 00:00:00 Within Flex they are assigned to a DateField with: var x:XML = new XML(WsImports.WsGetImportData.lastResult); dfArrival.selectedDate = x.result[0].arrivaldate[0]; But I get the error: cannot convert [EMAIL PROTECTED] element arrivaldate to Date Any ideas what would be the correct dateformat to use them in Flex ? Thanks a lot, Frank -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: dynamic vbox backgroundcolor in renderer
Hello, I tried doing this, but also without any luck ... the click event shows the correct text status0 or status1, so the data is correctly inserted into the renderer ?xml version=1.0? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalAlign=center horizontalGap=5 mx:Script ![CDATA[ import mx.controls.Alert; private function showErrorDialog(error:String):void { Alert.show(error, 'Alert Box', Alert.OK); } ]] /mx:Script mx:Style .status0 { backgroundColor: #FF; } .status1 { backgroundColor: #00FF00; } /mx:Style mx:VBox id=importcolor height=100% width=10 styleName={data.showstyle} click=showErrorDialog(data.showstyle); / !--backgroundColor={data.showcolor} -- mx:Text id=importnr width=100% selectable=false text={data.importnr} / /mx:HBox Greetings, Frank --- In flexcoders@yahoogroups.com, Igor Costa [EMAIL PROTECTED] wrote: In fact you need to use StyleName instead of using an import to the directly tag. I mean StyleName=importnr On 8/11/06, amigo_fd [EMAIL PROTECTED] wrote: Hello, I have a datagrid with three colums: mx:DataGrid id=dgImportSearchResults click=doImportSelected(); width=250 x=0 bottom=0 top=225 mx:columns mx:DataGridColumn headerText=Nr width=60 itemRenderer=renderer_dg_importstatus / mx:DataGridColumn headerText=Destination dataField=destination/ mx:DataGridColumn headerText=Bedrijf dataField=supplier/ /mx:columns /mx:DataGrid As you can see the first one uses a renderer to show different things within the same cell. This is the code for the renderer: ?xml version=1.0? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalAlign=center horizontalGap=5 mx:VBox id=importcolor height=100% width=10 backgroundColor={data.showcolor} / mx:Text id=importnr width=100% selectable=false text={data.importnr} / /mx:HBox The importnr is shown ok, but the backgroundColor doesn't do a thing ... it just stays black although the datafield showcolor contains #ff or #00ff00. What am I doing wrong ? Thanks, Frank -- Igor Costa www.igorcosta.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: dynamic vbox backgroundcolor in renderer
found a solution ! mx:Script ![CDATA[ private function setImportStyle(doStyle:String):void { importcolor.styleName = doStyle; } ]] /mx:Script mx:Style .status0 { backgroundColor: #FF; } .status1 { backgroundColor: #00FF00; } /mx:Style mx:VBox id=importcolor height=100% width=10 creationComplete=setImportStyle(data.showstyle); / mx:Text id=importnr width=100% selectable=false text={data.importnr} / --- In flexcoders@yahoogroups.com, Igor Costa [EMAIL PROTECTED] wrote: In fact you need to use StyleName instead of using an import to the directly tag. I mean StyleName=importnr On 8/11/06, amigo_fd [EMAIL PROTECTED] wrote: Hello, I have a datagrid with three colums: mx:DataGrid id=dgImportSearchResults click=doImportSelected(); width=250 x=0 bottom=0 top=225 mx:columns mx:DataGridColumn headerText=Nr width=60 itemRenderer=renderer_dg_importstatus / mx:DataGridColumn headerText=Destination dataField=destination/ mx:DataGridColumn headerText=Bedrijf dataField=supplier/ /mx:columns /mx:DataGrid As you can see the first one uses a renderer to show different things within the same cell. This is the code for the renderer: ?xml version=1.0? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalAlign=center horizontalGap=5 mx:VBox id=importcolor height=100% width=10 backgroundColor={data.showcolor} / mx:Text id=importnr width=100% selectable=false text={data.importnr} / /mx:HBox The importnr is shown ok, but the backgroundColor doesn't do a thing ... it just stays black although the datafield showcolor contains #ff or #00ff00. What am I doing wrong ? Thanks, Frank -- Igor Costa www.igorcosta.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] dynamic vbox backgroundcolor in renderer
Hello, I have a datagrid with three colums: mx:DataGrid id=dgImportSearchResults click=doImportSelected(); width=250 x=0 bottom=0 top=225 mx:columns mx:DataGridColumn headerText=Nr width=60 itemRenderer=renderer_dg_importstatus / mx:DataGridColumn headerText=Destination dataField=destination/ mx:DataGridColumn headerText=Bedrijf dataField=supplier/ /mx:columns /mx:DataGrid As you can see the first one uses a renderer to show different things within the same cell. This is the code for the renderer: ?xml version=1.0? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalAlign=center horizontalGap=5 mx:VBox id=importcolor height=100% width=10 backgroundColor={data.showcolor} / mx:Text id=importnr width=100% selectable=false text={data.importnr} / /mx:HBox The importnr is shown ok, but the backgroundColor doesn't do a thing ... it just stays black although the datafield showcolor contains #ff or #00ff00. What am I doing wrong ? Thanks, Frank -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/