Hi.
I have derived a CExtGridCellComboBox cell, to make a cell with a "dynamic" combo box cell.
The content of a listbox is created just when the user clicks on the combo box button.
I tried something like this, by overriding OnPopupListBoxInitContent:
bool ComboBoxCell::OnPopupListBoxInitContent(CExtPopupInplaceListBox &wndListBox,
CExtGridCell::TrackCellStateInfo_t &_tcsi)
{
Reload(); // reloads the content, by calling AddString, ResetContent, etc...
if (!CExtGridCellComboBox::
OnPopupListBoxInitContent(wndListBox, _tcsi))
return false;
return true;
}
It works, but there is an inconvenient.
It seems the height of the list box (that is to be shown) is determined before the reload,
which results in a popup listbox with a height not fitting the content.
For instance, if there is 1 item before OnPopupListBoxInitContent is called, and if Reload() adds an item, the popup listbox’s height is calculated
so that just 1 item is shown (though the scroll bar recognizes the second item).
Is there a trick to update the size of this list box?
Thanks.