rbBand.cx = width; rbBand.cyChild = height; Point preferred = getPreferredSize(); if (preferred != null) { rbBand.cyMinChild = rbBand.cyMaxChild = preferred.y; } else { rbBand.cyMinChild = rbBand.cyMaxChild = height; } OS.SendMessage (hwnd, OS.RB_SETBANDINFO, index, rbBand);
rbBand.cx = Math.max (width, rbBand.cxHeader); rbBand.cyChild = Math.max (MINIMUM_CHILD_HEIGHT, height); rbBand.cyMinChild = rbBand.cyMaxChild = rbBand.cyChild; OS.SendMessage (hwnd, OS.RB_SETBANDINFO, index, rbBand);
public void setSize (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_SIZE;	rbBand.cx = width;	rbBand.cyChild = height;	Point preferred = getPreferredSize();	if (preferred != null) {		rbBand.cyMinChild = rbBand.cyMaxChild = preferred.y;	} else {		rbBand.cyMinChild = rbBand.cyMaxChild = height;	}	OS.SendMessage (hwnd, OS.RB_SETBANDINFO, index, rbBand);	}