|
|
Class: UpDownButton
Object
|
+--GraphicsContext
|
+--DeviceGraphicsContext
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--UpDownButton
- Package:
- stx:libwidg2
- Category:
- Views-Interactors
- Version:
- rev:
1.22
date: 2004/10/26 10:52:24
- user: cg
- file: UpDownButton.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
- Author:
- Claus Gittinger
an up/down button - simply two buttons in one view.
This is also called SpinButton.
ArrowButton
ComboUpDownView
accessing-behavior
-
downAction: aBlock
-
set the down-action
-
enabled
-
-
enabled: aBoolean
-
-
upAction: aBlock
-
set the up-action
accessing-channels
-
backgroundChannel
-
return a valueHolder for the background color
-
backgroundChannel: aValueHolder
-
set a valueHolder for the background color
-
enableChannel
-
return a valueHolder for the enabled-state
-
enableChannel: aValueHolder
-
set a valueHolder for the enabled-state
-
foregroundChannel
-
return a valueHolder for the foreground color
-
foregroundChannel: aValueHolder
-
set a valueHolder for the foreground color
-
model: aModel
-
accessing-colors
-
backgroundColor
-
return the backgroundColor
-
backgroundColor: aColor
-
set the backgroundColor
-
foregroundColor
-
return the foregroundColor
-
foregroundColor: aColor
-
set the foregroundColor
-
viewBackground: aColor
-
accessing-components
-
downButton
-
return the downButton
-
upButton
-
return the upButton
accessing-look
-
orientation
-
return the orientation (a symbol)
-
orientation: aSymbol
-
set the orientation (#horizontal or #vertical)
change & update
-
sizeChanged: how
-
event handling
-
changeDown: aValue
-
down button was pressed, send to my model
-
changeUp: aValue
-
up button was pressed, send to my model
-
keyPress: aKey x: x y: y
-
simulate a buttonPress/release
focus handling
-
showFocus: explicit
-
display myself as having-focus
initialization
-
initialize
-
-
initializeButtonDimensions
-
-
initializeButtonForms
-
-
initializeButtons
-
|top ud|
top := StandardSystemView new.
top extent:(300 @ 200).
ud := UpDownButton in:top.
ud origin:(10 @ 10).
ud upAction:[Transcript showCR:'up'].
ud downAction:[Transcript showCR:'down'].
top open.
|
|top ud|
top := StandardSystemView new.
top extent:(300 @ 200).
ud := UpDownButton in:top.
ud origin:(10 @ 10).
ud model:[:arg| Transcript showCR:arg].
top open.
|
|top ud|
top := StandardSystemView new.
top extent:(300 @ 200).
ud := UpDownButton in:top.
ud orientation:#horizontal.
ud origin:(10 @ 10).
ud upAction:[Transcript showCR:'up'].
ud downAction:[Transcript showCR:'down'].
top open.
|
|