If we have no dropdown height give ourselves a minimum height of 5

items or max items (whichever is less).
This commit is contained in:
Aric Stewart 2002-08-28 00:53:23 +00:00 committed by Alexandre Julliard
parent 0393d43c8e
commit acb308af67

View file

@ -1195,12 +1195,22 @@ static void CBDropDown( LPHEADCOMBO lphc )
if (nItems > 0)
{
int nHeight;
int nIHeight;
nHeight = (int)SendMessageW(lphc->hWndLBox, LB_GETITEMHEIGHT, 0, 0);
nHeight *= nItems;
nIHeight = (int)SendMessageW(lphc->hWndLBox, LB_GETITEMHEIGHT, 0, 0);
nHeight = nIHeight*nItems;
if (nHeight < nDroppedHeight - COMBO_YBORDERSIZE())
nDroppedHeight = nHeight + COMBO_YBORDERSIZE();
if (nDroppedHeight < nIHeight)
{
if (nItems < 5)
nDroppedHeight = nHeight;
else
nDroppedHeight = 5*nIHeight;
}
}
/*If height of dropped rectangle gets beyond a screen size it should go up, otherwise down.*/