rbBand.cxIdeal = Math.max (0, width - parent.getMargin (index)); rbBand.cyMaxChild = height; if (!minimum) rbBand.cyMinChild = height;
rbBand.cxIdeal = cxIdeal; rbBand.cyMaxChild = cyMaxChild; if (!minimum) rbBand.cyMinChild = cyMaxChild;
public void setPreferredSize (int width, int height) {	checkWidget ();	int index = parent.indexOf (this);	if (index == -1) return;	width = Math.max (0, width);	height = Math.max (0, height);	ideal = true;	int hwnd = parent.handle;	REBARBANDINFO rbBand = new REBARBANDINFO ();	rbBand.cbSize = REBARBANDINFO.sizeof;		/* Get the child size fields first so we don't overwrite them. */	rbBand.fMask = OS.RBBIM_CHILDSIZE;	OS.SendMessage (hwnd, OS.RB_GETBANDINFO, index, rbBand);		/* Set the size fields we are currently modifying. */	rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE;	rbBand.cxIdeal = Math.max (0, width - parent.getMargin (index));	rbBand.cyMaxChild = height;	if (!minimum) rbBand.cyMinChild = height;	OS.SendMessage (hwnd, OS.RB_SETBANDINFO, index, rbBand);}