Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtGridCellPicture adjust height to that of the image Collapse All
Subject Author Date
Takis Takoglou Apr 9, 2009 - 2:40 AM

Good day and thanx for the many helpful replies.

My problem today is that i have a CExtGridCellPicture in my CExtPropertyGrid and i have loaded a .bmp file via

    CExtBitmap * bmp= new CExtBitmap;

    bmp->LoadBMP_File (L"c:/a.bmp");

Then i load the bitmap with : pValue->BitmapSet(bmp); //pValue is pointer to CExtGridCellPicture

Now the problem is that i want the cell to be stretched so that it contains the whole bitmap.

I have already made the bitmap to be in stretch mode using ImageModeSet() and i just want to change the dimensions of the container-cell.

Firstly i would like the Height of the cell to be changed to that of the bitmap.

So there are two things i must know:How to change the height of the CExtGridCellPicture and how to change the width of a CExtGridCellPicture

without changing the width of the whole PropertyGrid.


Thanx in advance




Technical Support Apr 13, 2009 - 1:24 PM

The 2.85 is to be released very soon. We still keep it under heavy testing. If you have a valid 2.84 license, then you can always request us for the latest Prof-UIS source code which is constantly updated at least weekly.

Technical Support Apr 9, 2009 - 12:59 PM

The property grid control in Prof-UIS 2.85 automatically increases height of picture cells because of improved CExtPropertyItem::OnGridRowInitialized() virtual method:

 void CExtPropertyItem::OnGridRowInitialized(
	CExtPropertyGridWnd & wndPG,
	CExtGridCell * pCellCaption,
	CExtGridCell * pCellValue
	ASSERT_VALID( this );
	ASSERT_VALID( (&wndPG) );
	ASSERT( hTreeItem != NULL );
	ASSERT_VALID( pCellCaption );
#ifdef _DEBUG
	if( pCellValue != NULL )
		ASSERT_VALID( pCellValue );
#endif // _DEBUG
	if( wndPG.ItemIsExpanded( hTreeItem ) )
		if( ! ExpandedGet() )
			wndPG.ItemExpand( hTreeItem, TVE_COLLAPSE );
	} // if( wndPG.ItemIsExpanded( hTreeItem ) )
		if( ExpandedGet() )
			wndPG.ItemFocusLock( true );
			wndPG.ItemExpand( hTreeItem, TVE_EXPAND );
			wndPG.ItemFocusLock( false );
	} // else from if( wndPG.ItemIsExpanded( hTreeItem ) )
	if( pCellValue != NULL )
		pCellValue->ModifyStyle( 0, __EGCS_PRESSED );
		pCellValue->ModifyStyleEx( 0, __EGCS_EX_UNDEFINED_ROLE );
		CSize sizePropCell = pCellValue->MeasureCell( &wndPG );
		INT nExt = 0;
		((CExtGridCell*)hTreeItem)->ExtentGet( nExt );
		if( nExt < )
			((CExtGridCell*)hTreeItem)->ExtentSet( );
	wndPG._OnSynchronizeInputEnabledCheckMark( this, false );

But if you need to change widths of the property grid control, then you need to walk through all the grid cells in the property values and measure them manually, measure value captions and compute total widths of the property grid window.

Takis Takoglou Apr 10, 2009 - 12:58 AM

I would like to renew my license to your newest version Prof-UIS 2.85 so that the problem is fixed, but unfortunately the current version in your purchase page is 2.84.

When will 2.85 be ready for purchase?


Thanx in advance,