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 » Question regarding AutoPreviewMode in CExtReportGridWnd Collapse All
Subject Author Date
David Skok Nov 9, 2007 - 1:02 PM

I am considering implementing a user interface design in my app similar to the Add/Remove Programs dialog in Control Panel. It is a list where the selected item includes a preview area that contains controls.

It looks like CExtReportGridWnd could work however it appears that preview mode is all or nothing in CExtReportGridWnd via ReportAutoPreviewModeSet. Is it possible to enable preview mode for one item at a time?

The other issue is the Cell in the preview area. Is it possible to implement a Cell that contains a dialog box?

Technical Support Nov 17, 2007 - 10:53 AM

We received your e-mail and sent you a modified version of your project which instantiates a dialog inside the cell’s preview area.

Technical Support Nov 10, 2007 - 12:50 PM

We would prefer to have a test project or a compiled application which demonstrates the design described in your message. It seems there should be no problems with the design you described.

David Skok Nov 16, 2007 - 7:20 AM

I put together a sample to attempt to use the preview area in a unique way. I have found that a cell in the preview area can display a check box but it’s state cannot be changed, nor can the text be edited. It will not display an elipsis button. It seems that the cell in the preview area is not selectable for editing at all unless there is something I missed. Assuming editing in the preview area can be worked out, ultimately I would like to have the cell in the preview area return a handle to a dialog when OnInplaceControlCreate is called for the cell. I looked at the source that creates the editor and see that it would very difficult for me to figure out how to make a dialog work as a cell editor. If it could work please consider it as a feature request.

I sent you my test project.

Thanks, Dave
        

Technical Support Nov 9, 2007 - 2:02 PM

The preview area in the report grid is a standalone grid cell object. It’s possible to assign this cell only for some rows or implement your own grid cell class which implements the CExtGridCell::MeasureCell() virtual method which measures itself depending on the focused row state. Unfortunately grid cells cannot contain HWND-based UI items such as dialogs. It’s possible to implement a custom grid cell class which looks like "preview area" in the Add/Remove Programs window on Windows 2000 and Windows XP and even make the "Change/Remove" program as a custom layout/painted ellipsis button which is a built-in button in each grid cell.

David Skok Nov 9, 2007 - 3:01 PM

I see that it would not be possible to implement the Add/Remove control exactly as is using the report grid. If the control operated slightly different as follows, could I make it work?

Use a report grid that displays all items without preview. The report grid contains a column that displays a button labeled "Edit" in the focused item. When the user presses that button, the preview is opened for that item. The Gridcell in the preview is focused and contains an in place edit control that is a dialog box. When the user is done editing, they press a button in the in place edit dialog which closes it and removes the preview area. The dialog will also be closed if any other item is focused.

Could this work?