Guest User

Two simple windows splitted with Sash - Scala

a guest
Mar 27th, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.58 KB | None | 0 0
  1. object Literoj extends SWTApp {
  2.   import Layoutable._
  3.   import Controlable._
  4.  
  5.   private val sash = new Sash(shell, SWT.BORDER|SWT.VERTICAL) ~~>
  6.       new FormData() ~~| Top(0,0) ~~| Bottom(100,0) ~~| Left(80,0)
  7.  
  8.   def main(args:Array[String]) = {
  9.     shell ~> new FormLayout()
  10.     val text1 = new Text(shell, SWT.BORDER|SWT.WRAP) ~~>
  11.       new FormData() ~~| Top(0,0) ~~| Bottom(100,0) ~~| Left(0,0) ~~| Right(sash,0)
  12.     val text2 = new Text(shell, SWT.BORDER|SWT.WRAP) ~~>
  13.       new FormData() ~~| Top(0,0) ~~| Bottom(100,0) ~~| Left(sash,0) ~~| Right(100,0)
  14.  
  15.     loop()
  16.   }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment