diff options
author | Steve Northover <steve> | 2002-08-08 16:06:46 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2002-08-08 16:06:46 +0000 |
commit | c8b2843b19e2f47129520b605930c420fa1fcc00 (patch) | |
tree | edbd6f1115eb7e33705bba66db3899c58940c79f | |
parent | e9e2ff359fca54280df5d34aa1ca007ec761e7d0 (diff) | |
download | eclipse.platform.swt-c8b2843b19e2f47129520b605930c420fa1fcc00.tar.gz eclipse.platform.swt-c8b2843b19e2f47129520b605930c420fa1fcc00.tar.xz eclipse.platform.swt-c8b2843b19e2f47129520b605930c420fa1fcc00.zip |
22144
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java index 30d9af7786..d58539f5f7 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java @@ -242,6 +242,18 @@ void createItem (CoolItem item, int index) { rbBand.cx = MAX_WIDTH;
}
+ /*
+ * Feature in Windows. Is possible that the item at index zero
+ * has the RBBS_BREAK flag set. When a new item is inserted at
+ * position zero, the previous item at position zero moves to
+ * a new line. The fix is to detect this case and clear the
+ * RBBS_BREAK flag on the previous item before inserting the
+ * new item.
+ */
+ if (index == 0 && count > 0) {
+ getItem (0).setWrap (false);
+ }
+
if (OS.SendMessage (handle, OS.RB_INSERTBAND, index, rbBand) == 0) {
error (SWT.ERROR_ITEM_NOT_ADDED);
}
|