if (ignoreRedraw) return false;
if (currentItem != null) { if (currentItem != item) fixScrollWidth = true; return false; }
boolean setScrollWidth (TableItem item, boolean force) {	if (ignoreRedraw) return false;	if (!force && (drawCount != 0 || !OS.IsWindowVisible (handle))) {		fixScrollWidth = true;		return false;	}	fixScrollWidth = false;	int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);	int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);	/*	* NOTE: It is much faster to measure the strings and compute the	* width of the scroll bar in non-virtual table rather than using	* LVM_SETCOLUMNWIDTH with LVSCW_AUTOSIZE.	*/	if (count == 1 && columns [0] == null) {		int newWidth = 0;		count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);		int index = 0;		int imageIndent = 0;		while (index < count) {			String string = null;			int font = -1;			if (item != null) {				string = item.text;				imageIndent = Math.max (imageIndent, item.imageIndent);				if (item.cellFont != null) font = item.cellFont [0];				if (font == -1) font = item.font;			} else {				if (items [index] != null) {					TableItem tableItem = items [index];					string = tableItem.text;					imageIndent = Math.max (imageIndent, tableItem.imageIndent);					if (tableItem.cellFont != null) font = tableItem.cellFont [0];					if (font == -1) font = tableItem.font;				}			}			if (string != null && string.length () != 0) {				if (font != -1) {					int hDC = OS.GetDC (handle);					int oldFont = OS.SelectObject (hDC, font);					int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;					TCHAR buffer = new TCHAR (getCodePage (), string, false);					RECT rect = new RECT ();					OS.DrawText (hDC, buffer, buffer.length (), rect, flags);					OS.SelectObject (hDC, oldFont);					OS.ReleaseDC (handle, hDC);					newWidth = Math.max (newWidth, rect.right - rect.left);				} else {					TCHAR buffer = new TCHAR (getCodePage (), string, true);					newWidth = Math.max (newWidth, OS.SendMessage (handle, OS.LVM_GETSTRINGWIDTH, 0, buffer));				}			}			if (item != null) break;			index++;		}		int hStateList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_STATE, 0);		if (hStateList != 0) {			int [] cx = new int [1], cy = new int [1];			OS.ImageList_GetIconSize (hStateList, cx, cy);			newWidth += cx [0] + INSET;		}		int hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);		if (hImageList != 0) {			int [] cx = new int [1], cy = new int [1];			OS.ImageList_GetIconSize (hImageList, cx, cy);			newWidth += (imageIndent + 1) * cx [0];		} else {			/*			* Bug in Windows.  When LVM_SETIMAGELIST is used to remove the			* image list by setting it to NULL, the item width and height			* is not changed and space is reserved for icons despite the			* fact that there are none.  The fix is to set the image list			* to be very small before setting it to NULL.  This causes			* Windows to reserve the smallest possible space when an image			* list is removed.  In this case, the scroll width must be one			* pixel larger.			*/			newWidth++;		}		newWidth += INSET * 2;		int oldWidth = OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);		if (newWidth > oldWidth) {			OS.SendMessage (handle, OS.LVM_SETCOLUMNWIDTH, 0, newWidth);			return true;		}	}	return false;}