DialogBox.st
changeset 164 5ab02ff0d9ae
parent 162 1c68705a8903
child 174 d80a6cc3f9b2
equal deleted inserted replaced
163:18d87bf16389 164:5ab02ff0d9ae
    23 
    23 
    24 !DialogBox class methodsFor:'documentation'!
    24 !DialogBox class methodsFor:'documentation'!
    25 
    25 
    26 version
    26 version
    27 "
    27 "
    28 $Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.23 1995-09-18 10:38:12 claus Exp $
    28 $Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.24 1995-10-23 20:06:06 cg Exp $
    29 "
    29 "
    30 !
    30 !
    31 
    31 
    32 documentation
    32 documentation
    33 "
    33 "
   530 	    Transcript show:'value3: '; showCr:value3 value.
   530 	    Transcript show:'value3: '; showCr:value3 value.
   531 	    Transcript show:'value4: '; showCr:value4 value.
   531 	    Transcript show:'value4: '; showCr:value4 value.
   532 	]
   532 	]
   533 
   533 
   534 
   534 
       
   535     adding two panels in a frame:
       
   536 
       
   537 	|box frame vPanel1 vPanel2 m1 m2 m3 m4 chk ef|
       
   538 
       
   539 	box := Dialog new.
       
   540 	box label:'example'.
       
   541 
       
   542 	frame := FramedBox label:'frame'.
       
   543 
       
   544 	vPanel1 := VerticalPanelView origin:0.0@0.0 corner:0.5@1.0 in:frame.
       
   545 	vPanel1 horizontalLayout:#leftSpace.
       
   546 	vPanel1 verticalLayout:#top.
       
   547 
       
   548 	vPanel2 := VerticalPanelView origin:0.5@0.0 corner:1.0@1.0 in:frame.
       
   549 	vPanel2 horizontalLayout:#leftSpace.
       
   550 	vPanel2 verticalLayout:#top.
       
   551 
       
   552 	m1 := true asValue.
       
   553 	m2 := true asValue.
       
   554 	m3 := true asValue.
       
   555 	m4 := 'hello' asValue.
       
   556 
       
   557 	vPanel1 add:(Label label:'check1').
       
   558 	vPanel1 add:(Label label:'m2').
       
   559 	vPanel1 add:(Label label:'m3').
       
   560 	vPanel1 add:(Label label:'enter').
       
   561 	vPanel1 add:(Label label:'lbl1').
       
   562 	vPanel1 add:(Label label:'lbl2').
       
   563 
       
   564 	vPanel2 add:(chk := CheckToggle on:m1). 
       
   565 	box makeTabable:chk.
       
   566 
       
   567 	vPanel2 add:(chk := CheckToggle on:m2). 
       
   568 	box makeTabable:chk.
       
   569 
       
   570 	vPanel2 add:(chk := CheckToggle on:m3). 
       
   571 	box makeTabable:chk.
       
   572 
       
   573 	vPanel2 add:(chk := CheckToggle on:m3). 
       
   574 	box makeTabable:chk.
       
   575 
       
   576 	vPanel2 add:(chk := CheckToggle on:m3). 
       
   577 	box makeTabable:chk.
       
   578 
       
   579 	vPanel2 add:(ef := EditField on:m4). 
       
   580 	ef immediateAccept:true.
       
   581 	box makeTabable:ef.
       
   582 
       
   583 	box addComponent:frame.
       
   584 
       
   585 	box addAbortButton; addOkButton.
       
   586 	box openModal.
       
   587 	box accepted ifTrue:[
       
   588 	    Transcript showCr:'accepted with:'.
       
   589 	    Transcript showCr:'   m1: ' , m1 value printString.
       
   590 	    Transcript showCr:'   m2: ' , m2 value printString.
       
   591 	    Transcript showCr:'   m3: ' , m3 value printString.
       
   592 	    Transcript showCr:'   m4: ' , m4 value printString.
       
   593 	]
       
   594 
       
   595 
       
   596 
   535     a full example:
   597     a full example:
   536 
   598 
   537 	|box warnSTX allowUnderscore immutableArrays logDoits
   599 	|box warnSTX allowUnderscore immutableArrays logDoits
   538 	 listOfLanguages listOfStyles styleNames 
   600 	 listOfLanguages listOfStyles styleNames 
   539 	 frame panel c resourceDir dir |
   601 	 frame panel c resourceDir dir |