Subject |
Author |
Date |
|
Offer Har
|
Mar 21, 2010 - 6:33 AM
|
Dear Support, We have a grid with a CExtGridCellDropListComboBox with long texts. We made the column wide, so the text will be visible, however the drop-list width does not get the same width as the column, and the texts are cut. Even worse, at a certain columns width, the drop-list width get narrower and narrower then the column width... as we make the column wider, the drop-list get narrower.... Please fix. Thanks, Ron.
|
|
Technical Support
|
Mar 23, 2010 - 10:58 AM
|
|
|
Offer Har
|
Mar 23, 2010 - 12:07 PM
|
But there is a bug... read my mail... Please make the column very wide - half a screen.... 1000 pixels wide and you’ll see that the drop list is not 1000 pixels wide!
|
|
Technical Support
|
Mar 23, 2010 - 12:57 PM
|
Yes, you are right. We should extend the maximal available size of popup list boxes to the work area size of the monitor where the popup list box should appear. Please update the source code for the following method: CSize CExtGridCell::OnPopupListBoxQueryMaxSize(
CExtPopupInplaceListBox & wndListBox,
CExtGridCell::TrackCellStateInfo_t & _tcsi
)
{
// returned CSize( 0, 0 ) means no limit in size - what means use monitor limits
__EXT_DEBUG_GRID_ASSERT_VALID( this );
__EXT_DEBUG_GRID_ASSERT( (&_tcsi.m_cell) == this );
__EXT_DEBUG_GRID_ASSERT_VALID( (&_tcsi.m_wndGrid) );
__EXT_DEBUG_GRID_ASSERT( wndListBox.GetSafeHwnd() != NULL );
CSize _size = _tcsi.m_wndGrid.OnGridCellPopupListBoxQueryMaxSize( wndListBox, _tcsi );
if( _size.cx >= 0 && _size.cy >= 0 )
return _size;
CRect rcCellScreen = _tcsi.m_rcCell;
_tcsi.m_wndGrid.ClientToScreen( &rcCellScreen );
CExtPaintManager::monitor_parms_t _mp;
CExtPaintManager::stat_GetMonitorParms( _mp, rcCellScreen );
CRect rcAvailableSpaces(
rcCellScreen.left - _mp.m_rcWorkArea.left - 1,
rcCellScreen.top - _mp.m_rcWorkArea.top - 1,
_mp.m_rcWorkArea.right - rcCellScreen.right - 1,
_mp.m_rcWorkArea.bottom - rcCellScreen.bottom - 1
);
CSize sizeAvailable = rcAvailableSpaces.Size();
return sizeAvailable;
}
|
|
Offer Har
|
Mar 24, 2010 - 9:05 AM
|
Dear Support, Your solution still have some bug. I had a case that the column width was ~700, and the sizeAvailable.cx was only 212.... Please check (I have lots if images showing the bug if you want...) However, I added this line before the return, and I can live with it for now...:
sizeAvailable.cx = max(200, rcCellScreen.Width()); I realy do not understand why you make all the computations there for this simple task. Please fix for the next version. Ron.
|
|
Technical Support
|
Mar 25, 2010 - 2:37 AM
|
Could you please comment the sizeAvailable.cx = max(200, rcCellScreen.Width()); suggested line of code and create a screen shot demonstrating the problem for us?
|
|
Offer Har
|
Mar 25, 2010 - 2:50 AM
|
Dear Support, I’m out of the office for 10 days. The bug is there... very easy to reproduce... the picture will just show you how the width is less then the cell width. I also saw it in the cx variable that the value was not close to the cell width. Ron.
|
|
Offer Har
|
Mar 22, 2010 - 12:52 PM
|
Dear Support, Please try and widen the combo’s column... up to half screen, and you’ll see it. Ron.
|
|
Technical Support
|
Mar 23, 2010 - 9:27 AM
|
|
|
Offer Har
|
Mar 23, 2010 - 9:58 AM
|
Dear Support, I need the drop-list width to be computed as follows: 1. If the cell width is less then X then X 2. If the cell width is more then X, then the cell’s width. If this is too complicated, then I need the drop-list to be exactly the same width as the cell. This is not what i see now when the cell is very wide (half screen for example)
|
|
Technical Support
|
Mar 22, 2010 - 11:39 AM
|
|