You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by DanielMcQ <da...@mcquilleninteractive.com> on 2017/04/15 20:43:48 UTC

Speeding up column resize

Hi,

My s:DataGrid is a bit slow when the user resizes a column, enough that it
makes it hard to us. I'm assuming the delay is because my rows use one of
two custom renderers (although both renderers are really just labels...one
render adds a background rect. with an alternating color and an indent and
some other small style tweaks).

Is there any way to speed up performance when the user resizes a column?
Perhaps have renderers listen for resize and hide themselves during the
user's drag?

Thanks for any tricks.

Best Regards,

Daniel




-----
~~~~~~~~~~~~~~~~~~~~~~~
mcquilleninteractive.com
simplediagrams.com
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Speeding-up-column-resize-tp15056.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Speeding up column resize

Posted by Javier Guerrero GarcĂ­a <ja...@gmail.com>.
Couldn't you just do that using the standard LabelItemRenderer and:

paddingLeft
alternatingItemColors
textIndent

properties? Also, you could just (temporarily) tune your custom item
renderer down to a standard LabelItemRendered, and check if your
assumptions are right, but since DataGrid uses virtual layout by default,
it's really strange that drawing a rect does such a mess (maybe the rect is
a bit too wide causing redraws on other columns too?)

On Sat, Apr 15, 2017 at 11:17 PM, Clint M <cm...@gmail.com> wrote:

> You could catch the GridEvent.SEPARATOR_MOUSE_DOWN, SEPARATOR_MOUSE_DRAG,
> and GridEvent.SEPARATOR_MOUSE_UP and then hide and show what you need to.
> The events are dispatched by the GridColumnHeaderGroup but they're mouse
> events so they should bubble up to the grid itself.
>
> On Sat, Apr 15, 2017 at 1:43 PM, DanielMcQ <daniel@mcquilleninteractive.
> com>
> wrote:
>
> > Hi,
> >
> > My s:DataGrid is a bit slow when the user resizes a column, enough that
> it
> > makes it hard to us. I'm assuming the delay is because my rows use one of
> > two custom renderers (although both renderers are really just
> labels...one
> > render adds a background rect. with an alternating color and an indent
> and
> > some other small style tweaks).
> >
> > Is there any way to speed up performance when the user resizes a column?
> > Perhaps have renderers listen for resize and hide themselves during the
> > user's drag?
> >
> > Thanks for any tricks.
> >
> > Best Regards,
> >
> > Daniel
> >
> >
> >
> >
> > -----
> > ~~~~~~~~~~~~~~~~~~~~~~~
> > mcquilleninteractive.com
> > simplediagrams.com
> > --
> > View this message in context: http://apache-flex-users.
> > 2333346.n4.nabble.com/Speeding-up-column-resize-tp15056.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >
>

Re: Speeding up column resize

Posted by Clint M <cm...@gmail.com>.
You could catch the GridEvent.SEPARATOR_MOUSE_DOWN, SEPARATOR_MOUSE_DRAG,
and GridEvent.SEPARATOR_MOUSE_UP and then hide and show what you need to.
The events are dispatched by the GridColumnHeaderGroup but they're mouse
events so they should bubble up to the grid itself.

On Sat, Apr 15, 2017 at 1:43 PM, DanielMcQ <da...@mcquilleninteractive.com>
wrote:

> Hi,
>
> My s:DataGrid is a bit slow when the user resizes a column, enough that it
> makes it hard to us. I'm assuming the delay is because my rows use one of
> two custom renderers (although both renderers are really just labels...one
> render adds a background rect. with an alternating color and an indent and
> some other small style tweaks).
>
> Is there any way to speed up performance when the user resizes a column?
> Perhaps have renderers listen for resize and hide themselves during the
> user's drag?
>
> Thanks for any tricks.
>
> Best Regards,
>
> Daniel
>
>
>
>
> -----
> ~~~~~~~~~~~~~~~~~~~~~~~
> mcquilleninteractive.com
> simplediagrams.com
> --
> View this message in context: http://apache-flex-users.
> 2333346.n4.nabble.com/Speeding-up-column-resize-tp15056.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>