Re: Widget creation performance [message #47312] |
Fri, 03 February 2006 09:01 |
Ricardo Bugalho
Messages: 22 Registered: March 2005
|
Junior Member |
|
|
Hello,
that solved the issue.
Thank you David!
On Fri, 2006-02-03 at 09:17 -0700, David Fanning wrote:
> Ricardo Bugalho writes:
>
>> I'm having some trouble with the performance of widget creation.
>> One of the components in my program contains a list of items, for which
>> I need to have a few labels and buttons per entry.
>> To achieve this, whenever the item list changes, I destroy the list's
>> base widget and then recreate a new base for my entry list and the
>> entries' widgets.
>> But it's slow. I can actually see IDL redrawing the widgets. The problem
>> seems to be that for every widget I add, IDL reorganizes the layout.
>> Does anyone have any ideias?
>
> Turn updating off for your top-level base widget until you
> are finished creating your new widget, then turn it back on.
>
> Widget_Control, tlb, UPDATE=0
> ..... do your widget thing here....
> Widget_Control, tlb, UPDATE=1
>
> Cheers,
>
> David
>
|
|
|
Re: Widget creation performance [message #47313 is a reply to message #47312] |
Fri, 03 February 2006 08:17  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ricardo Bugalho writes:
> I'm having some trouble with the performance of widget creation.
> One of the components in my program contains a list of items, for which
> I need to have a few labels and buttons per entry.
> To achieve this, whenever the item list changes, I destroy the list's
> base widget and then recreate a new base for my entry list and the
> entries' widgets.
> But it's slow. I can actually see IDL redrawing the widgets. The problem
> seems to be that for every widget I add, IDL reorganizes the layout.
> Does anyone have any ideias?
Turn updating off for your top-level base widget until you
are finished creating your new widget, then turn it back on.
Widget_Control, tlb, UPDATE=0
..... do your widget thing here....
Widget_Control, tlb, UPDATE=1
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|