DialogBox.st
changeset 131 208fa92f434d
parent 130 338e856bddc9
child 132 596439fe4efd
equal deleted inserted replaced
130:338e856bddc9 131:208fa92f434d
    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.15 1995-06-06 04:12:46 claus Exp $
    28 $Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.16 1995-06-27 02:22:28 claus Exp $
    29 "
    29 "
    30 !
    30 !
    31 
    31 
    32 documentation
    32 documentation
    33 "
    33 "
   374 	top := DialogBox new.
   374 	top := DialogBox new.
   375 
   375 
   376 	l := FileSelectionList on:fileName.
   376 	l := FileSelectionList on:fileName.
   377 	l useIndex:false.
   377 	l useIndex:false.
   378 	l doubleClickAction:[:name | top okPressed].
   378 	l doubleClickAction:[:name | top okPressed].
       
   379 	l action:[:name | fileName value:name].
   379 	scr := ScrollableView forView:l.
   380 	scr := ScrollableView forView:l.
   380 	scr extent:(1.0 @ 300).
   381 	scr extent:(1.0 @ 300).
   381 
   382 
   382 	top addComponent:scr.
   383 	top addComponent:scr.
   383 	top addAbortButton; addOkButton.
   384 	top addAbortButton; addOkButton.
   397 	top := DialogBox new.
   398 	top := DialogBox new.
   398 
   399 
   399 	l := FileSelectionList on:fileName.
   400 	l := FileSelectionList on:fileName.
   400 	l useIndex:false.
   401 	l useIndex:false.
   401 	l doubleClickAction:[:name | top okPressed].
   402 	l doubleClickAction:[:name | top okPressed].
       
   403 	l action:[:name | fileName value:name].
   402 	scr := ScrollableView forView:l.
   404 	scr := ScrollableView forView:l.
   403 
   405 
   404 	top addComponent:scr withExtent:300@300.
   406 	top addComponent:scr withExtent:300@300.
   405 	top addAbortButton; addOkButton.
   407 	top addAbortButton; addOkButton.
   406 	top openModal.
   408 	top openModal.
   424 	fixFrame extent:(1.0 @ 300).
   426 	fixFrame extent:(1.0 @ 300).
   425 
   427 
   426 	l := FileSelectionList on:fileName.
   428 	l := FileSelectionList on:fileName.
   427 	l useIndex:false.
   429 	l useIndex:false.
   428 	l doubleClickAction:[:name | top okPressed].
   430 	l doubleClickAction:[:name | top okPressed].
       
   431 	l action:[:name | fileName value:name].
   429 	scr := ScrollableView forView:l.
   432 	scr := ScrollableView forView:l.
   430 	fixFrame add:scr in:(0.0@0.0 corner:1.0@1.0).
   433 	fixFrame add:scr in:(0.0@0.0 corner:1.0@1.0).
   431 
   434 
   432 	top addComponent:fixFrame.
   435 	top addComponent:fixFrame.
   433 	top addAbortButton; addOkButton.
   436 	top addAbortButton; addOkButton.
  1125     aComponent height:height.
  1128     aComponent height:height.
  1126     aComponent origin:0.0@yPosition; 
  1129     aComponent origin:0.0@yPosition; 
  1127 	       width:1.0; 
  1130 	       width:1.0; 
  1128 	       leftInset:leftIndent;
  1131 	       leftInset:leftIndent;
  1129 	       rightInset:rightIndent.
  1132 	       rightInset:rightIndent.
  1130     yPosition := yPosition + aComponent height.
  1133     yPosition := yPosition + "aComponent" height + ViewSpacing.
  1131     ^ aComponent
  1134     ^ aComponent
  1132 !
  1135 !
  1133 
  1136 
  1134 addComponent:aComponent withExtent:ext 
  1137 addComponent:aComponent withExtent:ext 
  1135     "add a component with some given extent.
  1138     "add a component with some given extent.
  1138     self basicAddComponent:aComponent.
  1141     self basicAddComponent:aComponent.
  1139     aComponent extent:ext.
  1142     aComponent extent:ext.
  1140     aComponent origin:0.0@yPosition; 
  1143     aComponent origin:0.0@yPosition; 
  1141 	       leftInset:leftIndent; 
  1144 	       leftInset:leftIndent; 
  1142 	       rightInset:rightIndent.
  1145 	       rightInset:rightIndent.
  1143     yPosition := yPosition + aComponent height.
  1146     yPosition := yPosition + aComponent height + ViewSpacing.
  1144     ^ aComponent
  1147     ^ aComponent
  1145 !
  1148 !
  1146 
  1149 
  1147 addComponent:aComponent tabable:tabable
  1150 addComponent:aComponent tabable:tabable
  1148     "add a component with its preferred height and full width.
  1151     "add a component with its preferred height and full width.