[flexcoders] Re: Flex 4.1 VBOX background renderer fails

2011-10-24 Thread turbo_vb
In practice, itemRenderers actually tend to be the best candidate for skins.

-TH

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> You cannot set the backgroundColor of the renderer.  Backgrounds are removed 
> in order to allow alternating background colors to show through.  But you 
> should be able to set it on the TextArea.
> 
> 
> On 10/24/11 6:40 PM, "Sells, Fred"  wrote:
> 
> 
> 
> 
> 
> 
> Yes I tried setStyle() as well as styleName= with no success.  I could not 
> set the backgroundColor property in actionscript (compiler did not recognize 
> property) but I could set that property in mxml to a binding expression and 
> set the color in the bound variable.  Suspect bug but deadlines rapidly 
> approaching and this works.
> 
> I'll try upgrading to 4.5 once I get this delivery out.
> 
> 
> From: flexcoders@yahoogroups.com [mailto:flexcoders@yah! oogroups.com] On 
> Behalf Of Alex Harui
> Sent: Monday, October 24, 2011 7:41 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Flex 4.1 VBOX background renderer fails
> 
> 
> 
> Did you try myText.setStyle("backgroundColor", ...)?
> 
> 
> On 10/24/11 9:59 AM, "Sells, Fred"  wrote:
> 
> 
> 
> 
> 
> 
> I'm using a VBox as a renderer for a datagrid as shown below.  I've
> tried every combination I can think of but I can only set the background
> color of the mx:TextArea in the mxml.  I need to change it in the
> actionscri! pt.  I've tried styles and properties with no success. &n! 
> bsp;I'm< br>reluctant to change wrapper or children since I had a very hard 
> time
> getting it to work with a custom row height.  I used HTML text so I
> could add some bold/font color decoration; although that requirement has
> dissipated.
> 
> 
> http://ns.adobe.com/mxml/2009";
>  xmlns:s="library://ns.adobe.com/flex/spark"
>  xmlns:mx="library://ns.adobe.com/flex/mx"
>  borderThickness="0"
>  verticalScrollPolicy="off" horizontalScrollPolicy="off"
>  paddingBottom="0" paddingLeft="0" paddingRight="0"
> paddingTop="0"
>  >
> 
> 
> 
>   useHandCursor="true" buttonMode="true"
> mouseFocusEnabled="false" mouseChildren="false"
>  editable="false"
>  verticalScrollPolicy="off"
> horizontalScrollPolicy="off"
>  >
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>




Re: [flexcoders] Flex 4.1 VBOX background renderer fails

2011-10-24 Thread Alex Harui
You cannot set the backgroundColor of the renderer.  Backgrounds are removed in 
order to allow alternating background colors to show through.  But you should 
be able to set it on the TextArea.


On 10/24/11 6:40 PM, "Sells, Fred"  wrote:






Yes I tried setStyle() as well as styleName= with no success.  I could not set 
the backgroundColor property in actionscript (compiler did not recognize 
property) but I could set that property in mxml to a binding expression and set 
the color in the bound variable.  Suspect bug but deadlines rapidly approaching 
and this works.

I’ll try upgrading to 4.5 once I get this delivery out.


From: flexcoders@yahoogroups.com [mailto:flexcoders@yah! oogroups.com] On 
Behalf Of Alex Harui
Sent: Monday, October 24, 2011 7:41 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 4.1 VBOX background renderer fails



Did you try myText.setStyle(“backgroundColor”, ...)?


On 10/24/11 9:59 AM, "Sells, Fred"  wrote:






I'm using a VBox as a renderer for a datagrid as shown below.  I've
tried every combination I can think of but I can only set the background
color of the mx:TextArea in the mxml.  I need to change it in the
actionscri! pt.  I've tried styles and properties with no success. &n! bsp;I'm< 
br>reluctant to change wrapper or children since I had a very hard time
getting it to work with a custom row height.  I used HTML text so I
could add some bold/font color decoration; although that requirement has
dissipated.


http://ns.adobe.com/mxml/2009";
 xmlns:s="library://ns.adobe.com/flex/spark"
 xmlns:mx="library://ns.adobe.com/flex/mx"
 borderThickness="0"
 verticalScrollPolicy="off" horizontalScrollPolicy="off"
 paddingBottom="0" paddingLeft="0" paddingRight="0"
paddingTop="0"
 >















--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


RE: [flexcoders] Flex 4.1 VBOX background renderer fails

2011-10-24 Thread Sells, Fred
Yes I tried setStyle() as well as styleName= with no success.  I could
not set the backgroundColor property in actionscript (compiler did not
recognize property) but I could set that property in mxml to a binding
expression and set the color in the bound variable.  Suspect bug but
deadlines rapidly approaching and this works.

 

I'll try upgrading to 4.5 once I get this delivery out.

 

From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
Behalf Of Alex Harui
Sent: Monday, October 24, 2011 7:41 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 4.1 VBOX background renderer fails

 

  

Did you try myText.setStyle("backgroundColor", ...)?


On 10/24/11 9:59 AM, "Sells, Fred"  wrote:


 
 
   

I'm using a VBox as a renderer for a datagrid as shown below.
I've
tried every combination I can think of but I can only set the
background
color of the mx:TextArea in the mxml.  I need to change it in
the
actionscript.  I've tried styles and properties with no success.
I'm
reluctant to change wrapper or children since I had a very hard
time
getting it to work with a custom row height.  I used HTML text
so I
could add some bold/font color decoration; although that
requirement has
dissipated. 


http://ns.adobe.com/mxml/2009"; 
 xmlns:s="library://ns.adobe.com/flex/spark" 
 xmlns:mx="library://ns.adobe.com/flex/mx"
 borderThickness="0"
 verticalScrollPolicy="off" horizontalScrollPolicy="off"
 paddingBottom="0" paddingLeft="0" paddingRight="0"
paddingTop="0"
 >




 


 


 
   




-- 
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui





[flexcoders] AIR - PHP : How to load local file to remote server

2011-10-24 Thread isa_loyer
Dear Flex,

I search some idea to load local file to remote server with php.
I try to do that, but it didn't works

 var rq:URLRequest = new URLRequest(new urlManager().urlService() + 
"upload.php");
rq.method = URLRequestMethod.POST;
var varphp:URLVariables = new 
URLVariables();
varphp.userID = monIdPatient;
varphp.url = myFileDir;

rq.data = varphp;
file.upload(rq, 'Filedata');




Re: [flexcoders] Flex 4.1 VBOX background renderer fails

2011-10-24 Thread Alex Harui
Did you try myText.setStyle(“backgroundColor”, ...)?


On 10/24/11 9:59 AM, "Sells, Fred"  wrote:






I'm using a VBox as a renderer for a datagrid as shown below.  I've
tried every combination I can think of but I can only set the background
color of the mx:TextArea in the mxml.  I need to change it in the
actionscript.  I've tried styles and properties with no success.  I'm
reluctant to change wrapper or children since I had a very hard time
getting it to work with a custom row height.  I used HTML text so I
could add some bold/font color decoration; although that requirement has
dissipated.


http://ns.adobe.com/mxml/2009";
 xmlns:s="library://ns.adobe.com/flex/spark"
 xmlns:mx="library://ns.adobe.com/flex/mx"
 borderThickness="0"
 verticalScrollPolicy="off" horizontalScrollPolicy="off"
 paddingBottom="0" paddingLeft="0" paddingRight="0"
paddingTop="0"
 >















--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


[flexcoders] Re: FTE vs TextField

2011-10-24 Thread guyinthechairdotcom

This thread is a little old, but yes, the font and source text are embedded in 
those examples.

The FTE handles inline-progressions necessary for internationalization. It 
performs ligature and sub-pixel rendering. It gives you control over kerning, 
justification letter spacing, auto-hyphenation, and line spacing. It has an 
incredible amount of typographical advantages over TextField. Hell, with the 
right code, you can build documents from HTML and CSS.

That said, it's a pain in the ass to use from the standpoint of a component 
developer.

If you just want lightweight text rendering, you can use the very few classes 
in tinytlf that render and layout textblocks. If you want decorations, 
selection, interaction, scrolling (yes, this is a feature), HTML support, CSS 
support, etc. you will increase the size of your SWF proportionally.

I agree, it's unfortunate that the TLF isn't modular enough to be used outside 
the framework, but that's their choice. At least you can look at the source of 
the TLF and fork it/fix bugs/extend and enhance it if you need to.

Or you can take the approach I have, and write a different one.

--- In flexcoders@yahoogroups.com, "enridp"  wrote:
>
> I was reading about FTE, and I can't see any advantage over TextField. 
> Maybe I'm not understanding it well...
> 
> If we have bold, italic, differents colors, etc we must create a lot of 
> TextElements with FTE vs htmlText in TextField
> We must render each line separately vs only one TextField.
> We must write a LOT of code for selecting text (we need to detect the mouse 
> events, change the cursor, draw the selection, etc) vs automatic in TextField.
> (also, a simple task as selection the text is consuming 20% of CPU with FTE)
> And you must make your own context menu for copy the text in FTE...
> You must code your own centered and right alignment too...
> 
> Here are 3 great tutorials about FTE:
> http://guyinthechair.com/2010/06/the-flash-text-engine-part-1/
> http://guyinthechair.com/2010/06/the-flash-text-engine-part-2-interaction/
> http://guyinthechair.com/2010/08/the-fte-part-3-textblocks-textlines-and-text-layout/
> 
> But every SWF is about 200KB, and I don't know why, I mean, FTE is inside 
> FP10, and we are not using TLF (maybe the font is embedded?)
> 
> What's is the "cool" thing about FTE? I see it like a nightmare and 
> performance killer.
>




[flexcoders] Flex 4.1 VBOX background renderer fails

2011-10-24 Thread Sells, Fred
I'm using a VBox as a renderer for a datagrid as shown below.  I've
tried every combination I can think of but I can only set the background
color of the mx:TextArea in the mxml.  I need to change it in the
actionscript.  I've tried styles and properties with no success.  I'm
reluctant to change wrapper or children since I had a very hard time
getting it to work with a custom row height.  I used HTML text so I
could add some bold/font color decoration; although that requirement has
dissipated. 


http://ns.adobe.com/mxml/2009"; 
 xmlns:s="library://ns.adobe.com/flex/spark" 
 xmlns:mx="library://ns.adobe.com/flex/mx"
 borderThickness="0"
 verticalScrollPolicy="off" horizontalScrollPolicy="off"
 paddingBottom="0" paddingLeft="0" paddingRight="0"
paddingTop="0"
 >




 


 




[flexcoders] Re: right align the gridcolumn text

2011-10-24 Thread turbo_vb
ClassFactory doesn't support setting styles; they're different than properties. 
 You can get around this by either:

1) use a custom item renderer that has a styleName or css selector.

2) extend ClassFactory to support setting styles on the item renderer 
instances.  See com.blogagic.core.UIComponentFactory at 
http://blogagic.com/_flex/libagic_source/srcview/index.html

-TH

--- In flexcoders@yahoogroups.com, "bhaq1972"  wrote:
>
> GridColumn doesn't have the textAlign style. Instead we can do this -
> 
> 
>   
> 
>   
>   ..
> 
> How can I do this in actionscript? I've tried the following but doesn't work
> 
> var renderer1:ClassFactory = new ClassFactory(DefaultItemRenderer);
> renderer1.properties = { textAlign:"right", color:0xff00ff };
> col.itemRenderer = renderer1; //doesnt work
>




[flexcoders] right align the gridcolumn text

2011-10-24 Thread bhaq1972
GridColumn doesn't have the textAlign style. Instead we can do this -


  


..

How can I do this in actionscript? I've tried the following but doesn't work

var renderer1:ClassFactory = new ClassFactory(DefaultItemRenderer);
renderer1.properties = { textAlign:"right", color:0xff00ff };
col.itemRenderer = renderer1; //doesnt work



[flexcoders] GUI for different moiles

2011-10-24 Thread sony antony
I am developing screen for a mobile application.
Need to have it worked on different devices like, IPad , IPhone, Google Nexus, 
Tablets, etc.

How do I select the button icon image size and size and positioning of other 
controls in the app.
Any need to implement dpi?

Regards,

Sony.

Re: [flexcoders] Re: Print-or-PDF AdvancedDataGrid

2011-10-24 Thread Paul Hastings
On 10/24/2011 12:05 PM, steveroger_flex wrote:
> i went through the purePDF.
> but i didn't found "how to get pdf of complete AdvancedDataGrid"...

just in case it's not obvious, take the datagrid's dataprovider & use 
PdfPTable. 
if the data is hierarchical, you'll need to nest another table to hold that 
data. there are examples showing how to build tables here:

http://code.google.com/p/purepdf/wiki/Examples