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

CTableListButtonInterpreter

Methods Index

Heritage
Description
Usage
Protected Data Members;
Public Methods
Protected Methods

CTableListButtonInterpreter


Heritage

Superclass: CTableViewInterpreter (internal class)

Subclasses: None


Description

This class provides an interpreter for placing list-button 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 table as a whole.

The CTableListButtonInterpreter uses text-based data to select one of the items in a list. If the cell contains data equal to one of the items, that item appears checked, otherwise the control appears unselected. When the user selects an item from the list button, the control will send the selected item as a text string.

    CTableAttributes anAttributesSet;
CTableListButtonInterpreter* anInterpreter =
new CTableListButtonInterpreter(
myTable->GetTableView(), // Owner
(UNITS)150 // Height when list is visible
)
anInterpreter->AddString( "red" );
anInterpreter->AddString( "green" );
anInterpreter->AddString( "blue" );
anInterpreter->AddString( "yellow" );
anInterpreter->AddString( "cyan" );
anInterpreter->AddString( "magenta" );
anAttributesSet.Interpreter( anInterpreter );
myTable->SetColumn(3, anAttributesSet);

Protected Data Members;

RWOrdered itsStrings; List of strings to appear in the list button
UNITS itsHeight; Height of list buttons when dropped down


Public Methods

CTableListButtonInterpreter(CTableView* theTable, 
UNITS theHeight);
void AddString(const CStringRW& theString);
virtual CCellView* CreateCellView(CTableView* theTable,
const CTableInterpreterParameters& theParameters,
const CTdiValue* theData);

Protected Methods

virtual ~CTableListButtonInterpreter();


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

support@xvt.com


Visit our online help desk for tech support

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