void clear (int hItem, TVITEM tvItem) { tvItem.hItem = hItem; TreeItem item = null; if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) != 0) { item = tvItem.lParam != -1 ? items [tvItem.lParam] : null; } if (item != null) { item.clear (); item.redraw ();
public void clear (int index, boolean all) { checkWidget (); int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0); if (hItem == 0) error (SWT.ERROR_INVALID_RANGE); hItem = findItem (hItem, index); if (hItem == 0) error (SWT.ERROR_INVALID_RANGE); TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM; clear (hItem, tvItem); if (all) { hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem); clearAll (hItem, tvItem, all);
void clear (int hItem, TVITEM tvItem) {	tvItem.hItem = hItem;	TreeItem item = null;	if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) != 0) {		item = tvItem.lParam != -1 ? items [tvItem.lParam] : null;	}	if (item != null) {		item.clear ();		item.redraw ();	}}