diff options
author | Steve Northover <steve> | 2006-02-25 01:26:42 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2006-02-25 01:26:42 +0000 |
commit | c6734199cc3d4996c7b8950e42878de95b4d8f68 (patch) | |
tree | 6b874c0c45056cb810557837e949d4bc2eef0277 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java | |
parent | 89095343e84c893963c134017d1073ca571e70c2 (diff) | |
download | eclipse.platform.swt-c6734199cc3d4996c7b8950e42878de95b4d8f68.tar.gz eclipse.platform.swt-c6734199cc3d4996c7b8950e42878de95b4d8f68.tar.xz eclipse.platform.swt-c6734199cc3d4996c7b8950e42878de95b4d8f68.zip |
126818 - Horizontal ScrollBar not ReSized When Table Contents Changed
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java index 51ddfdb058..57f218a604 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java @@ -2226,6 +2226,12 @@ public void remove (int start, int end) { System.arraycopy (items, index, items, start, count - index); for (int i=count-(index-start); i<count; i++) items [i] = null; if (index <= end) error (SWT.ERROR_ITEM_NOT_REMOVED); + /* + * This code is intentionally commented. It is not necessary + * to check for an empty table because removeAll() was called + * when the start == 0 and end == count - 1. + */ + //if (count - index == 0) setTableEmpty (); setDeferResize (false); } } @@ -3540,6 +3546,12 @@ void setTableEmpty () { } items = new TableItem [4]; ignoreItemHeight = false; + int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0); + int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); + if (count == 1 && columns [0] == null) { + OS.SendMessage (handle, OS.LVM_SETCOLUMNWIDTH, 0, 0); + setScrollWidth (null, false); + } } /** |