Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2004-12-03 22:37:33 +0000
committerCarolyn MacLeod2004-12-03 22:37:33 +0000
commita9717b6ef648a5d7ba190f6798c2a0de6082ca85 (patch)
tree426d4b34476b59a91a12fd81b08409a76c9d8ee5 /examples
parent856f6a008a0ed77a41d39123c5600a8b16c79156 (diff)
downloadeclipse.platform.swt-a9717b6ef648a5d7ba190f6798c2a0de6082ca85.tar.gz
eclipse.platform.swt-a9717b6ef648a5d7ba190f6798c2a0de6082ca85.tar.xz
eclipse.platform.swt-a9717b6ef648a5d7ba190f6798c2a0de6082ca85.zip
*** empty log message ***
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/MenuTab.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/MenuTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/MenuTab.java
index 23f837e37f..9212b021f4 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/MenuTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/MenuTab.java
@@ -213,6 +213,11 @@ class MenuTab extends Tab {
closeAllShells ();
};
});
+ subMenuButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ subSubMenuButton.setEnabled (subMenuButton.getSelection ());
+ };
+ });
/* Set the default state */
barButton.setSelection (true);
@@ -223,6 +228,7 @@ class MenuTab extends Tab {
pushButton.setSelection (true);
radioButton.setSelection (true);
separatorButton.setSelection (true);
+ subSubMenuButton.setEnabled (subMenuButton.getSelection ());
}
/* Create various menu items, depending on selections. */
@@ -263,7 +269,7 @@ class MenuTab extends Tab {
hookListeners(item);
}
- if (createSubMenu) {
+ if (createSubMenu && cascadeButton.getSelection()) {
/* Create cascade button and drop-down menu for the sub-menu. */
item = new MenuItem(menu, SWT.CASCADE);
item.setText(getMenuItemText("Cascade"));

Back to the top