rem: count = WMGetArrayItemCount(table->columns); for (i = 0, width = 0; i < count; i++) { WMTableColumn *column = WMGetFromArray(table->columns, i);  WMMoveWidget(column->titleW, width, 0); WMResizeWidget(column->titleW, column->width-1, table->headerHeight);  if (i > 0) { WMView *splitter = WMGetFromArray(table->splitters, i-1);  W_MoveView(splitter, width-1, 0); } width += column->width; }  wassertr(table->delegate && table->delegate->numberOfRows);  table->rows = table->delegate->numberOfRows(table->delegate, table);  W_ResizeView(table->tableView, width+1, table->rows * table->rowHeight + 1);  table->tableWidth = width + 1;
add: rearrangeHeader(table);
context: void WMAddTableViewColumn(WMTableView *table, WMTableColumn *column){    int width;    int i;    WMScreen *scr = WMWidgetScreen(table);    int count;        column->table = table;    WMAddToArray(table->columns, column);            if (!column->titleW) {	column->titleW = WMCreateLabel(table);	WMSetLabelRelief(column->titleW, WRRaised);	WMSetLabelFont(column->titleW, scr->boldFont);	WMSetLabelTextColor(column->titleW, scr->white);	WMSetWidgetBackgroundColor(column->titleW, scr->darkGray);	WMSetLabelText(column->titleW, column->title);	W_ReparentView(WMWidgetView(column->titleW),		       WMWidgetView(table->header), 0, 0);	if (W_VIEW_REALIZED(table->view))	    WMRealizeWidget(column->titleW);	WMMapWidget(column->titleW);    }        if (WMGetArrayItemCount(table->columns) > 1) {	WMView *splitter = W_CreateView(WMWidgetView(table->header));	W_SetViewBackgroundColor(splitter, WMWhiteColor(scr));	if (W_VIEW_REALIZED(table->view))	    W_RealizeView(splitter);	W_ResizeView(splitter, 2, table->headerHeight-1);	W_MapView(splitter);		W_SetViewCursor(splitter, table->splitterCursor);	WMCreateEventHandler(splitter, ButtonPressMask,			     splitterHandler, table);	WMAddToArray(table->splitters, splitter);    }    count = WMGetArrayItemCount(table->columns);    for (i = 0, width = 0; i < count; i++) {	WMTableColumn *column = WMGetFromArray(table->columns, i);		WMMoveWidget(column->titleW, width, 0);	WMResizeWidget(column->titleW, column->width-1, table->headerHeight);		if (i > 0) {	    WMView *splitter = WMGetFromArray(table->splitters, i-1);	    W_MoveView(splitter, width-1, 0);	}	width += column->width;    }            wassertr(table->delegate && table->delegate->numberOfRows);        table->rows = table->delegate->numberOfRows(table->delegate, table);    W_ResizeView(table->tableView, width+1,		 table->rows * table->rowHeight + 1);        table->tableWidth = width + 1;}