[Classes] [Prev] [Next] [Methods]

CTableCheckBoxInterpreter

Methods Index

Heritage
Description
Usage
Protected Data Members
Public Methods
Protected Methods

CTableCheckBoxInterpreter


Heritage

Superclass: CTableViewInterpreter (internal class)

Subclasses: None


Description

This class provides an interpreter for placing check box controls in table cells.


Usage

Table interpreters handle the display of data within a table cell and user interaction with the cell and its data. By default, the table installs a text interpreter. To associate a different type of display (such as a control) to a cell or set of cells, you must create the appropriate interpreter and set it as an attribute on the desired cell, row, column, or the table as a whole.

The CTableCheckBoxInterpreter uses text-based data to turn the check box control on or off. If the cell contains data equal to the on string, the control appears checked, otherwise the control appears unchecked. When the user changes the state of the check box, the control will send either the on string or off string as the new data for the cell.

	CTableAttributes anAttributesSet;
CTableCheckBoxInterpreter* anInterpreter =
new CTableCheckBoxInterpreter(
myTable->GetTableView(), // Owner
"Check me" // Check box title
)
anInterpreter->OnString("true");
anInterpreter->OffString("false );
anAttributesSet.Interpreter(anInterpreter);
myTable->SetColumn(3, anAttributesSet);

Protected Data Members

CStringRW itsTitle; Control title
CStringRW itsOnString; String associated with the on check box state
CStringRW itsOffString; String associated with the off check box state


Public Methods

CTableCheckBoxInterpreter(CTableView* theTable, 
const CStringRW& theTitle);
void OnString(const CStringRW& theString);
const CStringRW& OnString() const;
void OffString(const CStringRW& theString);
const CStringRW& OffString() const;
virtual CCellView* CreateCellView(
CTableView* theTable,
const CTableInterpreterParameters& theParameters,
const CTdiValue* theData);

Protected Methods

virtual ~CTableCheckBoxInterpreter() { }


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.