fixed combo box PostCreateWidget to size properly

This commit is contained in:
karnaze%netscape.com 1998-10-15 15:51:31 +00:00
parent e178922316
commit 1ffe0ebea1

View File

@ -376,16 +376,6 @@ nsSelectControlFrame::PostCreateWidget(nsIPresContext* aPresContext,
return;
}
// get the size of the combo box and let Reflow change its desired size
if (mIsComboBox) { // hack
nscoord ignore;
nscoord height;
GetWidgetSize(*aPresContext, ignore, height);
if (height > aHeight) {
aHeight = height;
}
}
nsIListWidget* listWidget;
if (NS_OK != mWidget->QueryInterface(kListWidgetIID, (void **) &listWidget)) {
NS_ASSERTION(PR_FALSE, "invalid widget");
@ -429,6 +419,17 @@ nsSelectControlFrame::PostCreateWidget(nsIPresContext* aPresContext,
NS_RELEASE(listWidget);
// get the size of the combo box and let Reflow change its desired size
// XXX this technique should be considered for other widgets as well
if (mIsComboBox) {
nscoord ignore;
nscoord height;
GetWidgetSize(*aPresContext, ignore, height);
if (height > aHeight) {
aHeight = height;
}
}
Reset(); // initializes selections
}