[flexcoders] Re: dataGrid - hightlight row

2008-06-30 Thread markgoldin_2000
I have searched Flex Help for the word rowBG, but could not find 
anything. Could you please tell me at what point do I need to create 
displayObject with the name rowBG?

Thanks

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Not the DG, the actual displayObject with the name rowBG.  Please 
read
 up on the component lifecycle.  Things are often created on demand.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of markgoldin_2000
 Sent: Sunday, June 29, 2008 9:38 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: dataGrid - hightlight row
 
  
 
 Make sure it has been created
 You mean dataGrid?
 I am tracing after dataProvider has been assigned to it. I thought 
 that would have been the right time.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Should work. Debug into it. Make sure it has been created. You 
 might
  be asking too soon.
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 ] On
  Behalf Of markgoldin_2000
  Sent: Sunday, June 29, 2008 12:07 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] Re: dataGrid - hightlight row
  
  
  
  I am trying this in dataGrid:
  trace(listContent.getChildByName(rowBGs));
  but it returns null.
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
 40yahoogroups.com
  , Alex Harui aharui@ wrote:
  
   drawRowBackground runs often, not just at creation time, but it 
  does run
   before drawColumnBackgrounds.
   
   
   
   You can use the examples from my blog that have customized cell
   backgrounds and skip the whole drawRow/drawColumn stuff.
   
   
   
   You can also try switching the z order of the row and column
   backgrounds. That's not officially supported, but some sort of
   
   
   
   getChildByName(lines) and getChildByName(rowBGs) and testing
   getChildIndex and using setChildIndex might allow you to switch 
 the 
  z
   order.
   
   
   
   
   
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
 40yahoogroups.com
  
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
 40yahoogroups.com
  ] On
   Behalf Of markgoldin_2000
   Sent: Sunday, June 29, 2008 10:18 AM
   To: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 mailto:flexcoders%
 40yahoogroups.com 
   Subject: [flexcoders] dataGrid - hightlight row
   
   
   
   I have seen some examples of this and these samples I've seen 
all 
  are 
   implementing drawRowBackground which works fine but not in my 
 case. 
  I 
   need to change row's background after I have applied columns 
   background. But drawRowBackground runs at a time dataGrtid is 
  created 
   so my row background that was set in drawRowBackground gets 
  overwritten 
   by the later upplied column's background. I am then trying to 
  implement 
   a custom renderer that accepts a click and changes draws a 
 colored 
  area 
   around itself:
   g.drawRect(e.target.x, e.target.y, e.target.width, 
 e.target.height 
  + 1);
   g.endFill();
   
   Using this approach I can color the whole row. But is a catch: 
my 
   columns have different colors. In case I have to restore row's 
   background color to original color how can I do that? Is there 
a 
  simple 
   way of doing it or I need to store colors into array and then 
  restore 
   them using same technique?
   
   Thanks
  
 





RE: [flexcoders] Re: dataGrid - hightlight row

2008-06-30 Thread Alex Harui
rowBG won't be in the help.  The doc does explain the lifecycle events
and that plus examination of the source code should indicate that you
would not create one on your own, but use the ones created for you,
probably at the end of updateDisplayList

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Monday, June 30, 2008 9:00 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: dataGrid - hightlight row

 

I have searched Flex Help for the word rowBG, but could not find 
anything. Could you please tell me at what point do I need to create 
displayObject with the name rowBG?

Thanks

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 Not the DG, the actual displayObject with the name rowBG. Please 
read
 up on the component lifecycle. Things are often created on demand.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of markgoldin_2000
 Sent: Sunday, June 29, 2008 9:38 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: dataGrid - hightlight row
 
 
 
 Make sure it has been created
 You mean dataGrid?
 I am tracing after dataProvider has been assigned to it. I thought 
 that would have been the right time.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Should work. Debug into it. Make sure it has been created. You 
 might
  be asking too soon.
  
  
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 ] On
  Behalf Of markgoldin_2000
  Sent: Sunday, June 29, 2008 12:07 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] Re: dataGrid - hightlight row
  
  
  
  I am trying this in dataGrid:
  trace(listContent.getChildByName(rowBGs));
  but it returns null.
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com mailto:flexcoders%
 40yahoogroups.com
  , Alex Harui aharui@ wrote:
  
   drawRowBackground runs often, not just at creation time, but it 
  does run
   before drawColumnBackgrounds.
   
   
   
   You can use the examples from my blog that have customized cell
   backgrounds and skip the whole drawRow/drawColumn stuff.
   
   
   
   You can also try switching the z order of the row and column
   backgrounds. That's not officially supported, but some sort of
   
   
   
   getChildByName(lines) and getChildByName(rowBGs) and testing
   getChildIndex and using setChildIndex might allow you to switch 
 the 
  z
   order.
   
   
   
   
   
   From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com mailto:flexcoders%
 40yahoogroups.com
  
  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com mailto:flexcoders%
 40yahoogroups.com
  ] On
   Behalf Of markgoldin_2000
   Sent: Sunday, June 29, 2008 10:18 AM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 mailto:flexcoders%
 40yahoogroups.com 
   Subject: [flexcoders] dataGrid - hightlight row
   
   
   
   I have seen some examples of this and these samples I've seen 
all 
  are 
   implementing drawRowBackground which works fine but not in my 
 case. 
  I 
   need to change row's background after I have applied columns 
   background. But drawRowBackground runs at a time dataGrtid is 
  created 
   so my row background that was set in drawRowBackground gets 
  overwritten 
   by the later upplied column's background. I am then trying to 
  implement 
   a custom renderer that accepts a click and changes draws a 
 colored 
  area 
   around itself:
   g.drawRect(e.target.x, e.target.y, e.target.width, 
 e.target.height 
  + 1);
   g.endFill();
   
   Using this approach I can color the whole row. But is a catch: 
my 
   columns have different colors. In case I have to restore row's 
   background color to original color how can I do that? Is there 
a 
  simple 
   way of doing it or I need to store colors into array and then 
  restore 
   them using same technique?
   
   Thanks
  
 


 



[flexcoders] Re: dataGrid - hightlight row

2008-06-29 Thread markgoldin_2000
I am trying this in dataGrid:
trace(listContent.getChildByName(rowBGs));
but it returns null.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 drawRowBackground runs often, not just at creation time, but it 
does run
 before drawColumnBackgrounds.
 
  
 
 You can use the examples from my blog that have customized cell
 backgrounds and skip the whole drawRow/drawColumn stuff.
 
  
 
 You can also try switching the z order of the row and column
 backgrounds.  That's not officially supported, but some sort of
 
  
 
 getChildByName(lines) and getChildByName(rowBGs) and testing
 getChildIndex and using setChildIndex might allow you to switch the 
z
 order.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of markgoldin_2000
 Sent: Sunday, June 29, 2008 10:18 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] dataGrid - hightlight row
 
  
 
 I have seen some examples of this and these samples I've seen all 
are 
 implementing drawRowBackground which works fine but not in my case. 
I 
 need to change row's background after I have applied columns 
 background. But drawRowBackground runs at a time dataGrtid is 
created 
 so my row background that was set in drawRowBackground gets 
overwritten 
 by the later upplied column's background. I am then trying to 
implement 
 a custom renderer that accepts a click and changes draws a colored 
area 
 around itself:
 g.drawRect(e.target.x, e.target.y, e.target.width, e.target.height 
+ 1);
 g.endFill();
 
 Using this approach I can color the whole row. But is a catch: my 
 columns have different colors. In case I have to restore row's 
 background color to original color how can I do that? Is there a 
simple 
 way of doing it or I need to store colors into array and then 
restore 
 them using same technique?
 
 Thanks





RE: [flexcoders] Re: dataGrid - hightlight row

2008-06-29 Thread Alex Harui
Should work.  Debug into it.  Make sure it has been created.  You might
be asking too soon.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Sunday, June 29, 2008 12:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: dataGrid - hightlight row

 

I am trying this in dataGrid:
trace(listContent.getChildByName(rowBGs));
but it returns null.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 drawRowBackground runs often, not just at creation time, but it 
does run
 before drawColumnBackgrounds.
 
 
 
 You can use the examples from my blog that have customized cell
 backgrounds and skip the whole drawRow/drawColumn stuff.
 
 
 
 You can also try switching the z order of the row and column
 backgrounds. That's not officially supported, but some sort of
 
 
 
 getChildByName(lines) and getChildByName(rowBGs) and testing
 getChildIndex and using setChildIndex might allow you to switch the 
z
 order.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of markgoldin_2000
 Sent: Sunday, June 29, 2008 10:18 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] dataGrid - hightlight row
 
 
 
 I have seen some examples of this and these samples I've seen all 
are 
 implementing drawRowBackground which works fine but not in my case. 
I 
 need to change row's background after I have applied columns 
 background. But drawRowBackground runs at a time dataGrtid is 
created 
 so my row background that was set in drawRowBackground gets 
overwritten 
 by the later upplied column's background. I am then trying to 
implement 
 a custom renderer that accepts a click and changes draws a colored 
area 
 around itself:
 g.drawRect(e.target.x, e.target.y, e.target.width, e.target.height 
+ 1);
 g.endFill();
 
 Using this approach I can color the whole row. But is a catch: my 
 columns have different colors. In case I have to restore row's 
 background color to original color how can I do that? Is there a 
simple 
 way of doing it or I need to store colors into array and then 
restore 
 them using same technique?
 
 Thanks


 



[flexcoders] Re: dataGrid - hightlight row

2008-06-29 Thread markgoldin_2000
Make sure it has been created
You mean dataGrid?
I am tracing after dataProvider has been assigned to it. I thought 
that would have been the right time.


--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Should work.  Debug into it.  Make sure it has been created.  You 
might
 be asking too soon.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of markgoldin_2000
 Sent: Sunday, June 29, 2008 12:07 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: dataGrid - hightlight row
 
  
 
 I am trying this in dataGrid:
 trace(listContent.getChildByName(rowBGs));
 but it returns null.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  drawRowBackground runs often, not just at creation time, but it 
 does run
  before drawColumnBackgrounds.
  
  
  
  You can use the examples from my blog that have customized cell
  backgrounds and skip the whole drawRow/drawColumn stuff.
  
  
  
  You can also try switching the z order of the row and column
  backgrounds. That's not officially supported, but some sort of
  
  
  
  getChildByName(lines) and getChildByName(rowBGs) and testing
  getChildIndex and using setChildIndex might allow you to switch 
the 
 z
  order.
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 ] On
  Behalf Of markgoldin_2000
  Sent: Sunday, June 29, 2008 10:18 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] dataGrid - hightlight row
  
  
  
  I have seen some examples of this and these samples I've seen all 
 are 
  implementing drawRowBackground which works fine but not in my 
case. 
 I 
  need to change row's background after I have applied columns 
  background. But drawRowBackground runs at a time dataGrtid is 
 created 
  so my row background that was set in drawRowBackground gets 
 overwritten 
  by the later upplied column's background. I am then trying to 
 implement 
  a custom renderer that accepts a click and changes draws a 
colored 
 area 
  around itself:
  g.drawRect(e.target.x, e.target.y, e.target.width, 
e.target.height 
 + 1);
  g.endFill();
  
  Using this approach I can color the whole row. But is a catch: my 
  columns have different colors. In case I have to restore row's 
  background color to original color how can I do that? Is there a 
 simple 
  way of doing it or I need to store colors into array and then 
 restore 
  them using same technique?
  
  Thanks
 





RE: [flexcoders] Re: dataGrid - hightlight row

2008-06-29 Thread Alex Harui
Not the DG, the actual displayObject with the name rowBG.  Please read
up on the component lifecycle.  Things are often created on demand.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Sunday, June 29, 2008 9:38 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: dataGrid - hightlight row

 

Make sure it has been created
You mean dataGrid?
I am tracing after dataProvider has been assigned to it. I thought 
that would have been the right time.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 Should work. Debug into it. Make sure it has been created. You 
might
 be asking too soon.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of markgoldin_2000
 Sent: Sunday, June 29, 2008 12:07 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: dataGrid - hightlight row
 
 
 
 I am trying this in dataGrid:
 trace(listContent.getChildByName(rowBGs));
 but it returns null.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  drawRowBackground runs often, not just at creation time, but it 
 does run
  before drawColumnBackgrounds.
  
  
  
  You can use the examples from my blog that have customized cell
  backgrounds and skip the whole drawRow/drawColumn stuff.
  
  
  
  You can also try switching the z order of the row and column
  backgrounds. That's not officially supported, but some sort of
  
  
  
  getChildByName(lines) and getChildByName(rowBGs) and testing
  getChildIndex and using setChildIndex might allow you to switch 
the 
 z
  order.
  
  
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 ] On
  Behalf Of markgoldin_2000
  Sent: Sunday, June 29, 2008 10:18 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] dataGrid - hightlight row
  
  
  
  I have seen some examples of this and these samples I've seen all 
 are 
  implementing drawRowBackground which works fine but not in my 
case. 
 I 
  need to change row's background after I have applied columns 
  background. But drawRowBackground runs at a time dataGrtid is 
 created 
  so my row background that was set in drawRowBackground gets 
 overwritten 
  by the later upplied column's background. I am then trying to 
 implement 
  a custom renderer that accepts a click and changes draws a 
colored 
 area 
  around itself:
  g.drawRect(e.target.x, e.target.y, e.target.width, 
e.target.height 
 + 1);
  g.endFill();
  
  Using this approach I can color the whole row. But is a catch: my 
  columns have different colors. In case I have to restore row's 
  background color to original color how can I do that? Is there a 
 simple 
  way of doing it or I need to store colors into array and then 
 restore 
  them using same technique?
  
  Thanks