Skip to content

Commit 82cbca9

Browse files
author
soheil_h_y
committed
1. StackLayout enhancements, done now.
1 parent d51f5c2 commit 82cbca9

File tree

1 file changed

+12
-3
lines changed
  • sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/custom

1 file changed

+12
-3
lines changed

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/custom/StackLayout.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,18 @@ protected void layout(Composite composite, boolean flushCache) {
113113
rect.width -= 2 * marginWidth;
114114
rect.height -= 2 * marginHeight;
115115
for (int i = 0; i < children.length; i++) {
116-
children[i].setBounds(rect);
117-
children[i].setVisible(children[i] == topControl);
118-
116+
//children[i].setBounds(rect);
117+
//children[i].setVisible(children[i] == topControl);
118+
/*
119+
* This will make the StackLayout work!
120+
*/
121+
if(children[i] != topControl){
122+
children[i].handle.style.display = "none";
123+
}
124+
else{
125+
children[i].setBounds(rect);
126+
children[i].handle.style.display = "block";
127+
}
119128
}
120129
}
121130

0 commit comments

Comments
 (0)