RE: [flexcoders] Icon for Button
Thanks for the clarification on that. I sort of figured it out after I realized that styleName can be either a String or a CSSStyleDeclaration. I've only ever assigned Strings to that property. Anyway, that's definitely something good to know. If it's not documented anywhere, it probably should be. Alex Harui [EMAIL PROTECTED] wrote: DGColumn extends CSSStyleDecl and is assigned as the styleName property of each renderer. When you call setStyle, you are adding new styles that each renderer will pick up, just as if it were a normal CSS selector. I would expect icon, MyIconClass to work. - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Glasser Sent: Monday, December 31, 2007 9:39 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Icon for Button Alex, This looks like a very useful piece of information, of which I was not previously aware. It's not quite clear to me what you mean, however. Could you expand on it a little, or else point me to some documentation that does? When you say the column is the styleName, what exactly do you mean? Is that the column header text, or perhaps the dataField property of the DataGridColumn? Also, since the DataGridColumn class extends CSSStyleDeclaration, what would be the effect of calling setStyle(icon, MyIconClass) on the DataGridColumn object itself? Alex Harui [EMAIL PROTECTED] wrote: The styleName for all renderers is the column it belongs to. - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Thursday, December 27, 2007 8:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Icon for Button I want to have a button in one of columns in the DataGrid. This button will delete rows on its click. I am adding the button to dataGrid as a itemRenderer. I am extending class Button: public class deleteRowGrid extends Button { public function deleteRowGrid() { super(); styleName = DeleteRow; } } I am using styleName to set an icon for the button. DeleteRow style is declared in the main application. When I run my code I have a button in the column but with no icon. Any idea why? Thanks
RE: [flexcoders] Icon for Button
DGColumn extends CSSStyleDecl and is assigned as the styleName property of each renderer. When you call setStyle, you are adding new styles that each renderer will pick up, just as if it were a normal CSS selector. I would expect icon, MyIconClass to work. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Glasser Sent: Monday, December 31, 2007 9:39 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Icon for Button Alex, This looks like a very useful piece of information, of which I was not previously aware. It's not quite clear to me what you mean, however. Could you expand on it a little, or else point me to some documentation that does? When you say the column is the styleName, what exactly do you mean? Is that the column header text, or perhaps the dataField property of the DataGridColumn? Also, since the DataGridColumn class extends CSSStyleDeclaration, what would be the effect of calling setStyle(icon, MyIconClass) on the DataGridColumn object itself? Alex Harui [EMAIL PROTECTED] wrote: The styleName for all renderers is the column it belongs to. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Thursday, December 27, 2007 8:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Icon for Button I want to have a button in one of columns in the DataGrid. This button will delete rows on its click. I am adding the button to dataGrid as a itemRenderer. I am extending class Button: public class deleteRowGrid extends Button {public function deleteRowGrid() { super(); styleName = DeleteRow; } } I am using styleName to set an icon for the button. DeleteRow style is declared in the main application. When I run my code I have a button in the column but with no icon. Any idea why? Thanks
RE: [flexcoders] Icon for Button
The styleName for all renderers is the column it belongs to. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Thursday, December 27, 2007 8:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Icon for Button I want to have a button in one of columns in the DataGrid. This button will delete rows on its click. I am adding the button to dataGrid as a itemRenderer. I am extending class Button: public class deleteRowGrid extends Button { public function deleteRowGrid() { super(); styleName = DeleteRow; } } I am using styleName to set an icon for the button. DeleteRow style is declared in the main application. When I run my code I have a button in the column but with no icon. Any idea why? Thanks
RE: [flexcoders] Icon for Button
And how are you using that style? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Thursday, December 27, 2007 6:48 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Icon for Button I am using this code: var consistPersonnel1Delete:AdvancedDataGridColumn = Personnel1Grid.columns[3]; consistPersonnel1Delete.setStyle( image, DeleteRow); Still have no image. Alex Harui [EMAIL PROTECTED] wrote: The styleName for all renderers is the column it belongs to. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Thursday, December 27, 2007 8:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Icon for Button I want to have a button in one of columns in the DataGrid. This button will delete rows on its click. I am adding the button to dataGrid as a itemRenderer. I am extending class Button: public class deleteRowGrid extends Button { public function deleteRowGrid() { super(); styleName = DeleteRow; } } I am using styleName to set an icon for the button. DeleteRow style is declared in the main application. When I run my code I have ! a button in the column but with no icon. Any idea why? Thanks
RE: [flexcoders] Icon for Button
My style is set in the main application: mx:Style .DeleteRow { icon:Embed(source='../assets/cut.png'); } /mx:Style I thought setting up style will show my image for every button in the column. Alex Harui [EMAIL PROTECTED] wrote: And how are you using that style? - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Thursday, December 27, 2007 6:48 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Icon for Button I am using this code: var consistPersonnel1Delete:AdvancedDataGridColumn = Personnel1Grid.columns[3]; consistPersonnel1Delete.setStyle( image, DeleteRow); Still have no image. Alex Harui [EMAIL PROTECTED] wrote: The styleName for all renderers is the column it belongs to. - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Thursday, December 27, 2007 8:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Icon for Button I want to have a button in one of columns in the DataGrid. This button will delete rows on its click. I am adding the button to dataGrid as a itemRenderer. I am extending class Button: public class deleteRowGrid extends Button { public function deleteRowGrid() { super(); styleName = DeleteRow; } } I am using styleName to set an icon for the button. DeleteRow style is declared in the main application. When I run my code I have ! a button in the column but with no icon. Any idea why? Thanks
RE: [flexcoders] Icon for Button
.DeleteRow is a class selector and must be assigned via the styleName property, which you can't really do because in a DataGrid a styleName must point to the DataGridColumn. I think all you want to do is embed the icon to a class: [Embed(source=../assets/cut.png')] public var mark:Class; and then do: consistPersonnel1Delete.setStyle( icon, mark); From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Thursday, December 27, 2007 7:24 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Icon for Button My style is set in the main application: mx:Style .DeleteRow { icon:Embed(source='../assets/cut.png'); } /mx:Style I thought setting up style will show my image for every button in the column. Alex Harui [EMAIL PROTECTED] wrote: And how are you using that style? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Thursday, December 27, 2007 6:48 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Icon for Button I am using this code: var consistPersonnel1Delete:AdvancedDataGridColumn = Personnel1Grid.columns[3]; consistPersonnel1Delete.setStyle( image, DeleteRow); Still have no image. Alex Harui [EMAIL PROTECTED] wrote: The styleName for all renderers is the column it belongs to. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Thursday, December 27, 2007 8:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Icon for Button I want to have a button in one of columns in the DataGrid. This button will delete rows on its click. I am adding th! e button to dataGrid as a itemRenderer. I am extending class Button: public class deleteRowGrid extends Button { public function deleteRowGrid() { super(); styleName = DeleteRow; } } I am using styleName to set an icon for the button. DeleteRow style is declared in the main application. When I run my code I have ! a button in the column but with no icon. Any idea why? Thanks
RE: [flexcoders] Icon in button without embed
Don't remember what shape this is in, but here's a version. Keep in mind, that the only startup time advantage of external icons is if the icons don't appear on the first screen. Otherwise you are also doing an http fetch to get them. That's worth it if you choose icons dynamically, but otherwise, the total network traffic will be less if you embed. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of danielvlopes Sent: Thursday, September 13, 2007 9:09 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Icon in button without embed Hello, someone know if is possible to use icons in buttons without use Embed? I had big application and this icons embeded in my swf file increase file size in more than 30kb. Thanks ExternalIconButton.as Description: ExternalIconButton.as MyApp.mxml Description: MyApp.mxml ExternalButtonIcon.as Description: ExternalButtonIcon.as
RE: [flexcoders] Icon in button without embed
IconUtility Component for Dynamic Run-Time Icons http://blog.benstucki.net/?p=42 HTH, Sam --- We're Hiring! Seeking a passionate developer to join our team building Flex based products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of danielvlopes Sent: Thursday, September 13, 2007 9:09 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Icon in button without embed Hello, someone know if is possible to use icons in buttons without use Embed? I had big application and this icons embeded in my swf file increase file size in more than 30kb. Thanks