Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 Tech Support » Multi-line edit in property grid Collapse All
Subject Author Date
Krustys Donuts Oct 24, 2007 - 3:19 PM

Hi Prof-uis!

I am using a CExtPropertyGridCtrl and would like to add a multi-line edit control, as well as custom controls that could span multiple lines (for example a small custom dialog as an in-place control which may be larger in size than the current row size).

Is this possible and is there an example?

Thanks!

Technical Support Oct 29, 2007 - 1:30 PM

Yes, you can use custom grid cell classes and a multiline text cell class (e.g. CExtGridCellString) in the property grid control. By default, the CExtPropertyGridCtrl class initializes property rows with default heights. You should create and use your own CExtPropertyValue-derived class which implements the CExtPropertyItem::OnGridRowInitialized() virtual method. This method is invoked when the tree grid’s item corresponding to the property value is inserted into tree grid window inside the property grid control. This allows you to specify the desired row height in the tree grid window using the CExtGridWnd::BestFitRow() method.

You can see how to use multiline cells in the Prof-UIS_Controls sample. Just open the Grid page and find the Text column.