You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Miguel Ferreira <mi...@hotmail.com> on 2013/10/16 15:32:02 UTC

datagrid default row height too big

Hi all,
I already test a lot of thing even monkey patch the skin of the datagrid, to take out the bold of the header and then try to minimize the row heights in the grid, but the second is getting a real headache to find where is the gap.
For example: on the skin i even change the property rowHeight but then my text is cutted and it seems that i have a GAP between of header and the letter of 4 pixeis and the gap is what i want to reduce from the top and also in the bottom.
i am sure that someone already battled this war...
Open to suggestions meanwhile my fight continues...
Best regards,Miguel  		 	   		  

Re: datagrid default row height too big

Posted by Alex Harui <ah...@adobe.com>.
You may have to override the measure() method and return a slightly
smaller measuredHeight.

On 10/16/13 7:48 AM, "Miguel Ferreira" <mi...@hotmail.com>
wrote:

>In this moment i have both!
>Because i am trying and trying...
>Maurice said something that can explain that all my changes in the custom
>item renderer dont affect that extra padding there...
>
>> From: aharui@adobe.com
>> To: users@flex.apache.org
>> Date: Wed, 16 Oct 2013 07:45:54 -0700
>> Subject: Re: datagrid default row height too big
>> 
>> Do you have a custom itemrenderer?  Or using the default?
>> 
>> On 10/16/13 7:05 AM, "Miguel Ferreira" <mi...@hotmail.com>
>> wrote:
>> 
>> >i am using spark datagrid, and in some parts of the project exits
>> >ma:Datagrid and advanced datagrid and the height of lines are diferrent
>> >the mx seems to reduce that gap between top and bottom of a cell.
>> >Some ideas?
>> >
>> >> From: maurice.amsellem@systar.com
>> >> To: users@flex.apache.org
>> >> Subject: RE: datagrid default row height too big
>> >> Date: Wed, 16 Oct 2013 13:40:57 +0000
>> >> 
>> >> Hi Miguel
>> >> 
>> >> Are you using spark DataGrid or mx DataGrid ?
>> >> 
>> >> Maurice 
>> >> 
>> >> -----Message d'origine-----
>> >> De : Miguel Ferreira [mailto:miguel.cd.ferreira@hotmail.com]
>> >> Envoyé : mercredi 16 octobre 2013 15:32
>> >> À : users@flex.apache.org
>> >> Objet : datagrid default row height too big
>> >> 
>> >> Hi all,
>> >> I already test a lot of thing even monkey patch the skin of the
>> >>datagrid, to take out the bold of the header and then try to minimize
>> >>the row heights in the grid, but the second is getting a real headache
>> >>to find where is the gap.
>> >> For example: on the skin i even change the property rowHeight but
>>then
>> >>my text is cutted and it seems that i have a GAP between of header and
>> >>the letter of 4 pixeis and the gap is what i want to reduce from the
>>top
>> >>and also in the bottom.
>> >> i am sure that someone already battled this war...
>> >> Open to suggestions meanwhile my fight continues...
>> >> Best regards,Miguel  		 	   		
>> > 		 	   		  
>> 
> 		 	   		  


RE: datagrid default row height too big

Posted by Miguel Ferreira <mi...@hotmail.com>.
In this moment i have both!
Because i am trying and trying...
Maurice said something that can explain that all my changes in the custom item renderer dont affect that extra padding there...

> From: aharui@adobe.com
> To: users@flex.apache.org
> Date: Wed, 16 Oct 2013 07:45:54 -0700
> Subject: Re: datagrid default row height too big
> 
> Do you have a custom itemrenderer?  Or using the default?
> 
> On 10/16/13 7:05 AM, "Miguel Ferreira" <mi...@hotmail.com>
> wrote:
> 
> >i am using spark datagrid, and in some parts of the project exits
> >ma:Datagrid and advanced datagrid and the height of lines are diferrent
> >the mx seems to reduce that gap between top and bottom of a cell.
> >Some ideas?
> >
> >> From: maurice.amsellem@systar.com
> >> To: users@flex.apache.org
> >> Subject: RE: datagrid default row height too big
> >> Date: Wed, 16 Oct 2013 13:40:57 +0000
> >> 
> >> Hi Miguel
> >> 
> >> Are you using spark DataGrid or mx DataGrid ?
> >> 
> >> Maurice 
> >> 
> >> -----Message d'origine-----
> >> De : Miguel Ferreira [mailto:miguel.cd.ferreira@hotmail.com]
> >> Envoyé : mercredi 16 octobre 2013 15:32
> >> À : users@flex.apache.org
> >> Objet : datagrid default row height too big
> >> 
> >> Hi all,
> >> I already test a lot of thing even monkey patch the skin of the
> >>datagrid, to take out the bold of the header and then try to minimize
> >>the row heights in the grid, but the second is getting a real headache
> >>to find where is the gap.
> >> For example: on the skin i even change the property rowHeight but then
> >>my text is cutted and it seems that i have a GAP between of header and
> >>the letter of 4 pixeis and the gap is what i want to reduce from the top
> >>and also in the bottom.
> >> i am sure that someone already battled this war...
> >> Open to suggestions meanwhile my fight continues...
> >> Best regards,Miguel  		 	   		
> > 		 	   		  
> 
 		 	   		  

RE: datagrid default row height too big

Posted by Maurice Amsellem <ma...@systar.com>.
Spark DataGrid uses spark.skins.spark.DefaultGridItemRenderer as the default renderer for grid cells.
This class inherits from FTETextFiled which has hard-coded padding of 2 (left, top, right and bottom).
This class has a "paddingTop" style, but it's disabled (excluded).
It seems also that this padding cannot even be overridden by subclassing (private vars and methods).

So unfortunately, I don't see how you can decrease the top padding of each row (if this is what you wanted to do).

Maybe someone else...

Maurice 

-----Message d'origine-----
De : Miguel Ferreira [mailto:miguel.cd.ferreira@hotmail.com] 
Envoyé : mercredi 16 octobre 2013 16:05
À : users@flex.apache.org
Objet : RE: datagrid default row height too big

i am using spark datagrid, and in some parts of the project exits ma:Datagrid and advanced datagrid and the height of lines are diferrent the mx seems to reduce that gap between top and bottom of a cell.
Some ideas?

> From: maurice.amsellem@systar.com
> To: users@flex.apache.org
> Subject: RE: datagrid default row height too big
> Date: Wed, 16 Oct 2013 13:40:57 +0000
> 
> Hi Miguel
> 
> Are you using spark DataGrid or mx DataGrid ?
> 
> Maurice
> 
> -----Message d'origine-----
> De : Miguel Ferreira [mailto:miguel.cd.ferreira@hotmail.com]
> Envoyé : mercredi 16 octobre 2013 15:32 À : users@flex.apache.org 
> Objet : datagrid default row height too big
> 
> Hi all,
> I already test a lot of thing even monkey patch the skin of the datagrid, to take out the bold of the header and then try to minimize the row heights in the grid, but the second is getting a real headache to find where is the gap.
> For example: on the skin i even change the property rowHeight but then my text is cutted and it seems that i have a GAP between of header and the letter of 4 pixeis and the gap is what i want to reduce from the top and also in the bottom.
> i am sure that someone already battled this war...
> Open to suggestions meanwhile my fight continues...
> Best regards,Miguel  		 	   		  
 		 	   		  

Re: datagrid default row height too big

Posted by Alex Harui <ah...@adobe.com>.
Do you have a custom itemrenderer?  Or using the default?

On 10/16/13 7:05 AM, "Miguel Ferreira" <mi...@hotmail.com>
wrote:

>i am using spark datagrid, and in some parts of the project exits
>ma:Datagrid and advanced datagrid and the height of lines are diferrent
>the mx seems to reduce that gap between top and bottom of a cell.
>Some ideas?
>
>> From: maurice.amsellem@systar.com
>> To: users@flex.apache.org
>> Subject: RE: datagrid default row height too big
>> Date: Wed, 16 Oct 2013 13:40:57 +0000
>> 
>> Hi Miguel
>> 
>> Are you using spark DataGrid or mx DataGrid ?
>> 
>> Maurice 
>> 
>> -----Message d'origine-----
>> De : Miguel Ferreira [mailto:miguel.cd.ferreira@hotmail.com]
>> Envoyé : mercredi 16 octobre 2013 15:32
>> À : users@flex.apache.org
>> Objet : datagrid default row height too big
>> 
>> Hi all,
>> I already test a lot of thing even monkey patch the skin of the
>>datagrid, to take out the bold of the header and then try to minimize
>>the row heights in the grid, but the second is getting a real headache
>>to find where is the gap.
>> For example: on the skin i even change the property rowHeight but then
>>my text is cutted and it seems that i have a GAP between of header and
>>the letter of 4 pixeis and the gap is what i want to reduce from the top
>>and also in the bottom.
>> i am sure that someone already battled this war...
>> Open to suggestions meanwhile my fight continues...
>> Best regards,Miguel  		 	   		
> 		 	   		  


RE: datagrid default row height too big

Posted by Miguel Ferreira <mi...@hotmail.com>.
i am using spark datagrid, and in some parts of the project exits ma:Datagrid and advanced datagrid and the height of lines are diferrent the mx seems to reduce that gap between top and bottom of a cell.
Some ideas?

> From: maurice.amsellem@systar.com
> To: users@flex.apache.org
> Subject: RE: datagrid default row height too big
> Date: Wed, 16 Oct 2013 13:40:57 +0000
> 
> Hi Miguel
> 
> Are you using spark DataGrid or mx DataGrid ?
> 
> Maurice 
> 
> -----Message d'origine-----
> De : Miguel Ferreira [mailto:miguel.cd.ferreira@hotmail.com] 
> Envoyé : mercredi 16 octobre 2013 15:32
> À : users@flex.apache.org
> Objet : datagrid default row height too big
> 
> Hi all,
> I already test a lot of thing even monkey patch the skin of the datagrid, to take out the bold of the header and then try to minimize the row heights in the grid, but the second is getting a real headache to find where is the gap.
> For example: on the skin i even change the property rowHeight but then my text is cutted and it seems that i have a GAP between of header and the letter of 4 pixeis and the gap is what i want to reduce from the top and also in the bottom.
> i am sure that someone already battled this war...
> Open to suggestions meanwhile my fight continues...
> Best regards,Miguel  		 	   		  
 		 	   		  

RE: datagrid default row height too big

Posted by Maurice Amsellem <ma...@systar.com>.
Hi Miguel

Are you using spark DataGrid or mx DataGrid ?

Maurice 

-----Message d'origine-----
De : Miguel Ferreira [mailto:miguel.cd.ferreira@hotmail.com] 
Envoyé : mercredi 16 octobre 2013 15:32
À : users@flex.apache.org
Objet : datagrid default row height too big

Hi all,
I already test a lot of thing even monkey patch the skin of the datagrid, to take out the bold of the header and then try to minimize the row heights in the grid, but the second is getting a real headache to find where is the gap.
For example: on the skin i even change the property rowHeight but then my text is cutted and it seems that i have a GAP between of header and the letter of 4 pixeis and the gap is what i want to reduce from the top and also in the bottom.
i am sure that someone already battled this war...
Open to suggestions meanwhile my fight continues...
Best regards,Miguel