Re: large widget_trees [message #54461] |
Thu, 14 June 2007 11:26 |
dktr.ted
Messages: 17 Registered: November 2006
|
Junior Member |
|
|
I've passed this problem on to ITT Technical Support. Don't know if
anyone here is using WIDGET_TREEs for this type of thing, but here's
some sample code that encapsulates the problem I'm having:
IDL> top = WIDGET_BASE(title='Test', /COLUMN)
IDL> tree = WIDGET_TREE(top, /MULTIPLE)
IDL> ids = LONARR(2001)
IDL> ids(0) = WIDGET_TREE(tree, /EXPANDED, /FOLDER, VALUE='Folder')
IDL> FOR i = 1, 2000 DO ids(i) = WIDGET_TREE(ids(0),
VALUE=STRCOMPRESS('Node '+STRING(i)))
IDL> WIDGET_CONTROL, top, /REALIZE
IDL> WIDGET_CONTROL, tree, SET_TREE_SELECT=ids
IDL> starttime = SYSTIME(1) & sel = WIDGET_INFO(tree, /TREE_SELECT) &
PRINT, SYSTIME(1) - starttime
17.078000
So it takes 17 seconds to retrieve the currently selected IDs within
this 2000 element WIDGET_TREE.
-Ted
|
|
|