Speeding up column resize

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Speeding up column resize

DanielMcQ
This post was updated on .
Hi,

My s:DataGrid is a bit slow when the user resizes a column, enough that it makes it hard to use. 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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Speeding up column resize

clintm
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 <[hidden email]>
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.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Speeding up column resize

Javier Guerrero García
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 <[hidden email]> 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.
> >
>
Loading...