.
"
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
SimpleView subclass:#LabelledEnterField
instanceVariableNames:'labelField textField'
classVariableNames:''
poolDictionaries:''
category:'Views-Interactors'
!
LabelledEnterField comment:'
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
$Header: /cvs/stx/stx/libwidg2/LabelledEnterField.st,v 1.6 1995-05-07 00:18:17 claus Exp $
written winter 91 by claus
'!
!LabelledEnterField class methodsFor:'documentation'!
documentation
"
An EnterField with a name.
"
!
version
"
$Header: /cvs/stx/stx/libwidg2/LabelledEnterField.st,v 1.6 1995-05-07 00:18:17 claus Exp $
"
!
copyright
"
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
! !
!LabelledEnterField methodsFor:'initialization'!
initialize
"setup; create the label and an enterfield"
super initialize.
labelField := Label in:self.
labelField level:0.
labelField origin:[margin @ (margin + textField margin)].
textField := EditField in:self.
textField origin:[(labelField origin x + labelField width) @ level]
extent:[(self width
- margin - margin
- labelField width) @ (textField heightIncludingBorder)].
"
forward keyboard input to the enterField
"
self delegate:(KeyboardForwarder from:self toView:textField)
"
LabelledEnterField new realize
"
! !
!LabelledEnterField methodsFor:'accessing'!
disable
textField disable
!
label:aString
labelField label:aString
!
contents
^ textField contents
!
contents:aString
textField contents:aString
! !