The List Wigdet Table of the Widgets The TreeList Wigdet
 

The Table (DataSet) Widget

A View of a DataSet Widget

View Class: DataSetView
Spec Class: DataSetSpec

The DataSet Widget is used to display a list of row items, each consisting of a number of columns. Row items can be selected and columns may (optionally) be modified.
 


The Basics Section:

ID Unique symbolic name (ID) of the widget.  
This ID can be used by the application to access the widget
via "builder>>componentAt:#ID".
Model Aspect selector or binding for the widgets model.
Typically, the name of a method implemented in the application,
which returns the model.
The model can be either a SelectionInList instance
(which holds both the list and the selection),
or a ValueModel* instance, holding the selection alone.
List Aspect selector or binding for the lists contents.
Typically, the name of a method implemented in the application,
which returns the list; usually, either a collection or
ValueModel* instance, holding some collection.
Index If on, the selection is kept as an index (or a collection of indices).
If off, the selection holds the selected item itself (or a collection of items).
Columns Aspect selector or binding for the description of columns. 
It should return a dataSet columns specification.
This specification defines how individual columns are to be extracted from a row-element, and if and how columns are editable.
Row elements are kept in the list.
Table Column Editor Opens a Table Column Editor on the column description.
Popup Menu Selector Aspect selector or binding for the building of a popup menu for the list widget. 
It should return a menu spec or a menu.
Popup Menu Performer Aspect selector or binding for sending the messages of the popup menu items to an object. 
It should return an object which is able to receive the messages
as specified in the menu items.
If blank, the application gets the menu messages.
Menu Editor Opens a Menu Editor on the popup menu spec.
Vertical Scroll Bar Turns on/off that the list widget provides vertical scrolling capabilities.
Vertical Mini Scroll Bar Turns on/off that the list widget uses a small vertical scroll bar. 
This attributes can only be set, if the attribute Vertical Scroll Bar is turned on.
Horizontal Scroll Bar Turns on/off that the list widget provides horizontal scrolling capabilities.
Horizontal Mini Scroll Bar Turns on/off that the list widget uses a small horizontal scroll bar. 
This attributes can only be set, if the attribute Horizontal Scroll Bar is turned on.
Auto Hide Controls autoHiding of scrollbars.
If on, scrollbars hide themself, if the contents is smaller than the scrolled view.
If off, scrollBars never hide themSelf.
If set to default, the autoHide feature is controlled by the viewStyle
and scrollbars behave "natural" for the operating system.
(true for windows, false for most unix-styles).
 
 

The Details1 Section:

Font Defines the font style of the widget. 
After selecting the check toggle the font style can be chosen by selecting one of the Family/Face/Style/Size buttons. If no font style is selected, the widget takes its default font style from the style sheet.
FG-Color Defines the foreground color of the widget. 
After selecting the check toggle the foreground color can be chosen by selecting the desired colored button. If no color  is selected, the widget takes its default foreground color from the style sheet.
BG-Color Defines the background color of the widget. 
After selecting the check toggle the background color can be chosen by selecting the desired colored button. If no color  is selected, the widget takes its default background color from the style sheet.
Border Defines the width of the border.
Level Defines the width of the 3D-border. 
Positive values provide a raising, 
negative values provide a lowering of the widget.
H-Spacing Defines the horizontal spacing between columns. 
V-Spacing Defines the vertical spacing between columns. 
3D Look Enable or Disable the 3D-Look of the separators 
Show Labels Defines the visibility of the Header-Line 
Make Rows
Dependent
If on, the widget makes itself a dependent on every row in the table (i.e. it observes every row).
If off, it only reacts to change notifications sent by the list itself (which should be an instance of List in this case).
Column Adaptor If left empty, columns are extracted from a row element object
by sending messages to them as specified in the columns description.
The get-selectors in the column description should be 0-arg selectors,
the set-selectors should be 1-arg selectors.

If non-empty, it defines an aspect selector or binding for an adaptor object (typically the application itself), which gets the row element as argument with the column message.
In this case, specify 1-arg get-messages and 2-arg set messages in the column description.

Use this, if there exists no appropriate protocol to access columns in the row-element class.

 
 

The Details2 Section:

Allow multiple
selections
If off, only a single item may be selected,
If off, multiple items may be selected (shift-click),
and the selection will consist of a collection.
Select Row for
Unselectable Cell
Defines the behavior if the user tries to select a none selectable cell.  If on, the whole row is selected, otherwise the selection changed to unselected.
Initially Disabled Turns on/off that the widget is initially disabled.
Initially Invisible Turns on/off that the widget is initially invisible.
Can Tab Turns on/off that the widget can be reached by tabbing.
 
 

The Callbacks Section:

Selected Method invoked when the selection changes.  
This defines the name of a method in the application,
which will be invoked whenever the row-selection changes.

Using a callback may be more convenient than adding a change interest on the model (i.e. defining a notification with #onChange:send:to:).

Dbl-Click Method invoked on double click. 
This defines the name of a method in the application,
which will be invoked whenever the user double clicks on an item.
Row If Absent Method invoked when a nil row element is encountered.  
This defines the name of a method in the application,
which will be invoked whenever a nil row element is encountered,
to ask for a replacement row.

The application is supposed to return a new row element for this item (which is then entered into the list model by the widget).

This may be used to setup the list incrementally,
if the construction of row objects is expensive in terms of CPU or real-time.
For example, then the information is extracted from a file or database.

Start Action Method invoked when pressing SHIFT-TAB at start of list.  
This optional method, provided by the application, is invoked when getting a key SHIFT-TAB on the top row/cell. The user can perform some actions.
End Action Method invoked when pressing TAB at end of list.  
This optional method, provided by the application, is invoked when getting a key TAB on the bottom row/cell. The user can perform some actions( for example adding a new empty row to the list of rows).
 * = ValueHolder, AspectAdaptor, BufferedValueHolder, RangeAdaptor, TriggerValue
** = true, false

 

The Drag & Drop Section:

see document "Implementing Drag and Drop"
 
 

The Help Section:

see document "Using the Help Tool"
 
 

The Layout Section:

see document "The Layout of the Widgets"
 
 


[stx-logo]
Copyright © 1998 eXept Software AG, all rights reserved