diff options
author | Kevin Barnes <krbarnes> | 2007-03-15 20:40:56 +0000 |
---|---|---|
committer | Kevin Barnes <krbarnes> | 2007-03-15 20:40:56 +0000 |
commit | 131cdbc116366733b0b5074c950de73ece1bc918 (patch) | |
tree | 205eea937b0f97343bdefdd63b25c253cfddc377 | |
parent | cacc94f9b2fe737b90a5444b26d6b449a74e822b (diff) | |
download | eclipse.platform.swt-131cdbc116366733b0b5074c950de73ece1bc918.tar.gz eclipse.platform.swt-131cdbc116366733b0b5074c950de73ece1bc918.tar.xz eclipse.platform.swt-131cdbc116366733b0b5074c950de73ece1bc918.zip |
fixed column width in setBounds
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java index a022ca6d8d..626e3829e3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java @@ -1753,13 +1753,14 @@ public void removeTreeListener(TreeListener listener) { int setBounds (int x, int y, int width, int height, int flags) { int result = super.setBounds (x, y, width, height, flags); if ((result & RESIZED) != 0) { + OS.FrameworkElement_Width (handle, width); + OS.FrameworkElement_Height (handle, height); if (columnCount == 0) { + double columnWidth = width - OS.SystemParameters_VerticalScrollBarWidth () - (getBorderWidth() * 2); int column = OS.GridViewColumnCollection_default (columns, 0); - OS.GridViewColumn_Width (column, width); + OS.GridViewColumn_Width (column, columnWidth); OS.GCHandle_Free (column); } - OS.FrameworkElement_Width (handle, width); - OS.FrameworkElement_Height (handle, height); } return result; } |