rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE | OS.RBBIM_SIZE; rbBand.cx = rbBand.cxIdeal = width; rbBand.cyMinChild = rbBand.cyMaxChild = height;
rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE; rbBand.cxIdeal = Math.max (0, width - rect.left - rect.right); rbBand.cyChild = Math.max (MINIMUM_CHILD_HEIGHT, height); rbBand.cyMinChild = rbBand.cyMaxChild = rbBand.cyChild;
public void setPreferredSize (int width, int height) {	checkWidget ();	int index = parent.indexOf (this);	if (index == -1) return;	int hwnd = parent.handle;	REBARBANDINFO rbBand = new REBARBANDINFO ();	rbBand.cbSize = REBARBANDINFO.sizeof;	rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE | OS.RBBIM_SIZE;	rbBand.cx = rbBand.cxIdeal = width;	rbBand.cyMinChild = rbBand.cyMaxChild = height;	OS.SendMessage (hwnd, OS.RB_SETBANDINFO, index, rbBand);}