From 12588946f81ae7cf5b0461707a77688b961e9a21 Mon Sep 17 00:00:00 2001 From: Veronika Irvine Date: Mon, 9 Feb 2004 15:42:21 +0000 Subject: call showColumn to scroll horizontally --- .../common/org/eclipse/swt/custom/TableCursor.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bundles/org.eclipse.swt') diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java index 66be96b2f9..d6174ba42b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java @@ -435,12 +435,17 @@ void traverse(Event event) { } void setRowColumn(int row, int column, boolean notify) { - if (0 <= row && row < table.getItemCount()) { - if (0 <= column && column < table.getColumnCount()) { + int itemCount = table.getItemCount(); + int columnCount = table.getColumnCount(); + if (0 <= row && row < itemCount) { + if (0 <= column && column < columnCount) { this.row = row; this.column = column; TableItem item = table.getItem(row); table.showItem(item); + if (columnCount > 1) { + table.showColumn(table.getColumn(column)); + } setBounds(item.getBounds(column)); redraw(); if (notify) { -- cgit