MFC Grid manual

CEditInPlaceHelper Class Reference

Helper class that facilitates some edit in place operations. More...

#include <Dapfor/GUI/EditInPlaceHelper.h>

List of all members.


Static Public Member Functions

static const Common::CFormatGetAppropriateFormat (const Common::CDataObject *pDO, const CColumn *column)
 Gets an appropriate format.
static
IEditInPlace::NavigationTarget 
FindNextNavigationTarget (const CEditInPlaceContext &context, IEditInPlace::StopReason stopReason)
 Finds the next cell to start edit in place.
static void AdjustControl (const CEditInPlaceContext &context, CEdit *editBox)
 Adjusts CEdit control to cell size and position, sets a font of CGrid and focus.
static CEmbeddedControlParams AdjustControl (const CEditInPlaceContext &context, CComboBox *comboBox)
 Adjusts CComboBox control to cell size and position, sets a font of CGrid and focus.
static UINT AdjustEditBoxStyle (const Common::CFormat *format, const CColumn *column)
 Adjusts CEdit style to a cell alignment.

Detailed Description

Helper class that facilitates some edit in place operations.

Version:
1.0.0.0 Initial version

Member Function Documentation

const Common::CFormat * GetAppropriateFormat ( const Common::CDataObject pDO,
const CColumn column 
) [static]

Gets an appropriate format.

The function looks for the format in the column, then if it is not found in the field table of the class, the pDO is instantiated from and if the format is not found, gets the default format, returned by Common::CFormat::GetDefaultFormat().

Parameters:
[in] pDO Pointer to a data object
[in] column to a column in CGrid
Returns:
Format if it is found. Otherwise zero.

IEditInPlace::NavigationTarget FindNextNavigationTarget ( const CEditInPlaceContext context,
IEditInPlace::StopReason  stopReason 
) [static]

Finds the next cell to start edit in place.

Parameters:
[in] context Edit in place related information
[in] stopReason Indicates the reason for the stop of edit in place.
Returns:
IEditInPlace::NavigationTarget object that contains a valid handle to the line in the grid and the valid column. Otherwise the handle and the column pointer will be equal to zero.

void AdjustControl ( const CEditInPlaceContext context,
CEdit *  editBox 
) [static]

Adjusts CEdit control to cell size and position, sets a font of CGrid and focus.

Parameters:
[in] context Edit in place related information
[in] editBox MFC CEdit control

CEmbeddedControlParams AdjustControl ( const CEditInPlaceContext context,
CComboBox *  comboBox 
) [static]

Adjusts CComboBox control to cell size and position, sets a font of CGrid and focus.

Parameters:
[in] context Edit in place related information
[in] comboBox MFC CComboBox control

UINT AdjustEditBoxStyle ( const Common::CFormat format,
const CColumn column 
) [static]

Adjusts CEdit style to a cell alignment.

Parameters:
[in] The column
Returns:
Adjusted style for CEdit control that depends on the style defined in the column.