For example, if you want to define a 3X3 table, with the column annotation "C1, C2, C3" and the row annotation "R1, R2, R3", you can assign values to the resources: XmNnumberOfColumns, XmNnumberOfRows, XmNautomaticColumnAnnotation, XmNautomaticRowAnnotation.
EditTable provides you with many resources. Refer to the EditTable Reference for more information.
1. Obtain the widget id of the annotation area through a call to XintScrollGetChild, then call XtSetValues or XtVaSetValues to set XmNbackground of the annotation widget.
2. Set the background color in the resource default file. You can use the names of the annotation widgets, documented under 'Scroll Components' in the EditTable manual, to set the background color.
For a more detailed description of XintScrollGetChild and the XintScroll widget, refer to the Reference Guide
Refer to the functions section of the EditTable Reference for more information.
The EditTable convenience functions XintEditTableFreezeColumn(), XintEditTableUnfreezeColumn() allow you to freeze/unfreeze columns.
Refer to the functions section of the EditTable Reference for more information.
Refer to the functions section of the EditTable Reference for more information.
The format for a column is specified using the convenience function XintEditTableDefineColumnFormat.
Refer to the functions section of the EditTable Reference for more information.
Question No. 9 provides a good example.
Refer to the functions section of the EditTable Reference for more information.
Refer to the functions section of the EditTable Reference for more information.
Simply create the embedded widget with the table as the parent and use the constraint resource XmNcellWidgetRange to specify the range of cells which are to contain this widget.
It may be important to make the contents of the widget reflect the visual characteristics of the underlying cell. EditTable will automatically set the necessary cell resources on the widget if the constraint resource XmNcellWidgetSetResources is set to True (which is the default).
Refer to the resources section of the EditTable Reference for more information.
Cell spanning is enabled by the resource XmNspanMode, which also determines the manner in which the cells will be drawn. EditTable also provides you with a convenience function XintEditTableSpanSetRange(), with which you can set the span range factor.
Refer to the resources and functions section of the EditTable Reference for more information.
Refer to the translations and actions section of the EditTable Reference for more information.
EditTable also offers a convenience function
XintEditTableFreezeUpdate for this purpose. Typically, you can use it
this way:
:
:
XintEditTableFreezeUpdate(Table, True);
:
.....your updates
:
XintEditTableFreezeUpdate(Table, False);
:
If you want to enable selections by row, the default list of actions must be changed in the translation table. Change EditTableStartSelect(single) to EditTableStartSelect(row) and to get multiple selections change it to EditTableStartSelect(multiple,row).
For example:
:
static char table_translations[] =
"Shift <Btn1Down>: EditTableStartSelect(multiple,row)\n\
Button <Motion>: EditTableExtendSelect()\n\
Shift <Btn2Down>: EditTableClearSelection()\n\
Shift <Btn3Down>: EditTableClearAllSelections()\n\
Ctrl <Btn1Down>: EditTableExtendSelect()";
:
:
Refer to the translations and actions section of the EditTable Reference for more information.
:
static char annotation_translations[] =
"~Ctrl ~Shift ~Meta ~Alt <Btn1Down> AnnotationStartSelect()\n\
:
:
<Btn2Down>: AnnotationStartDrag(move)\n\
<Btn2Up>: AnnotationEndDrag()\n\
:
:
Shift <Btn3Down>: EditTableClearAllSelections()";
:
:
Refer to the translations and actions section of the EditTable Reference for more information.
For example, suppose you want use the "Tab" key, to move the cursor to below and right:
:
static char table_translations[] =
"
:
None<Key> Tab: EditTableEnterCell(Right)\
EditTableEnterCell(Down)\
EditTableClearAllSelections()\n\
:
:
Refer to the translations and actions section of the EditTable Reference for more information.
Refer to the Scroll widget section of the Reference Guide for more information.
The following example shows you how to let two EditTable share a vertical scroll bar.
Refer to the functions section of the EditTable Reference for more information.
Refer to the functions section of the EditTable Reference for more information.