OptionBox.st
changeset 4383 7d374bd7b21c
parent 4382 30f95402085b
child 4490 db468327af5d
equal deleted inserted replaced
4382:30f95402085b 4383:7d374bd7b21c
   451     "Modified: 18.10.1996 / 14:54:30 / cg"
   451     "Modified: 18.10.1996 / 14:54:30 / cg"
   452 ! !
   452 ! !
   453 
   453 
   454 !OptionBox methodsFor:'accessing-components'!
   454 !OptionBox methodsFor:'accessing-components'!
   455 
   455 
   456 addCheckBox:label on:aValueHolder
       
   457     ^ self addCheckBoxAtBottom:label on:aValueHolder
       
   458 
       
   459     "Modified: / 28-02-2012 / 10:38:51 / cg"
       
   460 !
       
   461 
       
   462 buttons
   456 buttons
   463     "return the buttons collection"
   457     "return the buttons collection"
   464 
   458 
   465     ^ buttons
   459     ^ buttons
   466 !
   460 !
   565 
   559 
   566     "Modified: / 25.5.1999 / 16:08:06 / cg"
   560     "Modified: / 25.5.1999 / 16:08:06 / cg"
   567 !
   561 !
   568 
   562 
   569 initialize
   563 initialize
   570     |nButt mm vPanelLayout|
   564     |mm vPanelLayout|
   571 
   565 
   572     super initialize.
   566     super initialize.
   573 
   567 
   574     mm := ViewSpacing.
   568     mm := ViewSpacing.
   575 
   569 
   594     textLabel := Label label:'Select' in:labelPanel.
   588     textLabel := Label label:'Select' in:labelPanel.
   595     textLabel borderWidth:0.
   589     textLabel borderWidth:0.
   596 "/    textLabel origin:((mm + formLabel width + mm) @ mm).
   590 "/    textLabel origin:((mm + formLabel width + mm) @ mm).
   597 
   591 
   598     verticalPanel resize.
   592     verticalPanel resize.
       
   593     "/ cannot be done here - verticalPanel still has its defaul height and may be
       
   594     "/ not yet filled...
       
   595     "/ yPosition := verticalPanel height + (mm * 3).
   599 
   596 
   600 "/    buttonPanel isNil ifTrue:[
   597 "/    buttonPanel isNil ifTrue:[
   601 "/        buttonPanel := HorizontalPanelView origin:(0.0 @ 1.0) corner:(1.0 @ 1.0) in:self.
   598 "/        buttonPanel := HorizontalPanelView origin:(0.0 @ 1.0) corner:(1.0 @ 1.0) in:self.
   602 "/    ].
   599 "/    ].
   603     buttonPanel 
   600     buttonPanel 
   605         topInset:(font height + (mm * 4)) negated.
   602         topInset:(font height + (mm * 4)) negated.
   606     buttonPanel 
   603     buttonPanel 
   607         borderWidth:0; 
   604         borderWidth:0; 
   608         horizontalLayout:#fitSpace.
   605         horizontalLayout:#fitSpace.
   609 
   606 
   610     nButt := buttons size.
   607     1 to:(buttons size) do:[:index |
   611 
       
   612     1 to:nButt do:[:index |
       
   613         |button|
   608         |button|
   614 
   609 
   615         button := Button label:'press'.
   610         button := Button label:'press'.
   616         button action:[
   611         button action:[
   617                        (buttons at:index) turnOffWithoutRedraw.
   612                        (buttons at:index) turnOffWithoutRedraw.
   630 
   625 
   631      box := OptionBox title:'hello' numberOfOptions:4.
   626      box := OptionBox title:'hello' numberOfOptions:4.
   632      box open
   627      box open
   633     "
   628     "
   634 
   629 
   635     "Modified: / 27.7.1998 / 19:37:17 / cg"
   630     "Modified: / 28-02-2012 / 15:56:57 / cg"
   636 ! !
   631 ! !
   637 
   632 
   638 !OptionBox methodsFor:'queries'!
   633 !OptionBox methodsFor:'queries'!
   639 
   634 
   640 preferredExtent 
   635 preferredExtent 
   680 ! !
   675 ! !
   681 
   676 
   682 !OptionBox class methodsFor:'documentation'!
   677 !OptionBox class methodsFor:'documentation'!
   683 
   678 
   684 version
   679 version
   685     ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.73 2012-02-28 11:18:46 cg Exp $'
   680     ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.74 2012-02-28 15:00:06 cg Exp $'
   686 !
   681 !
   687 
   682 
   688 version_CVS
   683 version_CVS
   689     ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.73 2012-02-28 11:18:46 cg Exp $'
   684     ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.74 2012-02-28 15:00:06 cg Exp $'
   690 ! !
   685 ! !