DialogBox.st
changeset 1763 1c6be8158c27
parent 1760 631f902aaabe
child 1764 45ca6b617934
equal deleted inserted replaced
1762:848075aa087c 1763:1c6be8158c27
  3723     "Created: 18.10.1997 / 02:51:30 / cg"
  3723     "Created: 18.10.1997 / 02:51:30 / cg"
  3724 ! !
  3724 ! !
  3725 
  3725 
  3726 !DialogBox methodsFor:'construction-buttons'!
  3726 !DialogBox methodsFor:'construction-buttons'!
  3727 
  3727 
       
  3728 addAbortAndOkButtons
       
  3729     "create both abort- and Ok Buttons"
       
  3730 
       
  3731     self addAbortButton; addOkButton
       
  3732 !
       
  3733 
  3728 addAbortButton
  3734 addAbortButton
  3729     "create an abortButton - to be sent from redefined initialize
  3735     "create an abortButton - to be sent from redefined initialize
  3730      methods in subclasses or when creating a box programmatically.
  3736      methods in subclasses or when creating a box programmatically.
  3731      Returns the button."
  3737      Returns the button."
  3732 
  3738 
  3738      methods in subclasses or when creating a box programmatically.
  3744      methods in subclasses or when creating a box programmatically.
  3739      Returns the button."
  3745      Returns the button."
  3740 
  3746 
  3741     abortButton := aButton.
  3747     abortButton := aButton.
  3742     aButton model:self; change:#abortPressed.
  3748     aButton model:self; change:#abortPressed.
  3743     ^ self addButton:aButton.
  3749     (styleSheet at:'dialogBox.okAtLeft') ifTrue:[
       
  3750         self addButton:aButton after:nil.
       
  3751     ] ifFalse:[
       
  3752         self addButton:aButton before:nil.
       
  3753     ].
       
  3754     ^ aButton.
  3744 
  3755 
  3745     "Created: 17.9.1995 / 20:17:26 / claus"
  3756     "Created: 17.9.1995 / 20:17:26 / claus"
  3746 !
  3757 !
  3747 
  3758 
  3748 addAbortButtonLabelled:buttonLabel
  3759 addAbortButtonLabelled:buttonLabel
  3977 addOkButton:aButton 
  3988 addOkButton:aButton 
  3978     "add an already created okButton - to be sent from redefined initialize
  3989     "add an already created okButton - to be sent from redefined initialize
  3979      methods in subclasses or when creating a box programmatically.
  3990      methods in subclasses or when creating a box programmatically.
  3980      Returns the button."
  3991      Returns the button."
  3981 
  3992 
  3982     okButton := aButton.
  3993     okButton isNil ifTrue:[okButton := aButton].
  3983     aButton model:self; change:#okPressed.
  3994     aButton model:self; change:#okPressed.
  3984     (styleSheet at:'dialogBox.okAtLeft') ifTrue:[
  3995     (styleSheet at:'dialogBox.okAtLeft') ifTrue:[
  3985         self addButton:aButton before:nil.
  3996         self addButton:aButton before:nil.
  3986     ] ifFalse:[
  3997     ] ifFalse:[
  3987         self addButton:aButton after:nil.
  3998         self addButton:aButton after:nil.
  5903 ! !
  5914 ! !
  5904 
  5915 
  5905 !DialogBox class methodsFor:'documentation'!
  5916 !DialogBox class methodsFor:'documentation'!
  5906 
  5917 
  5907 version
  5918 version
  5908     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.129 1999-03-06 01:58:55 cg Exp $'
  5919     ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.130 1999-03-06 02:14:43 cg Exp $'
  5909 ! !
  5920 ! !
  5910 DialogBox initialize!
  5921 DialogBox initialize!