gui.setComponentUpdatesEnabled
Enables or disables updates on an editor GUI component.
Prototype
bOk = gui.setComponentUpdatesEnabled ( hComponent, bEnable )
Description
It is highly recommended that you disable updates on a component if you plan on running potentially time consuming scripts that affect the component, then reactivate them when you are done.
Parameters
hComponent - valid GUI component handle
bEnable - true to enable, false to disable
Return values
bOk - true on success
Sample
function onMainViewRefreshFileTree ( hTree, sDirectory ) if ( hTree ) then -- block for the duration of the refresh gui.enableTreeFilter ( hTree, false ) gui.enableTreeSort ( hTree, false ) gui.setComponentUpdatesEnabled ( hTree, false ) gui.removeAllTreeItems ( hTree ) -- do some new filling operation .... -- reenable after refresh gui.enableTreeFilter ( hTree, true ) gui.enableTreeSort ( hTree, true ) gui.setComponentUpdatesEnabled ( hTree, true ) onMainViewUpdateStatusBar ( ) end end
Available since ShiVa 2.0