File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,22 @@ LWAnalogClock class >> exampleThreeOClock [
23
23
^ aLWAnalogClock class new time: (Time hour: 15 minute: 7 second: 20 )
24
24
]
25
25
26
+ { #category : #' as yet unclassified' }
27
+ LWAnalogClock class >> exampleWithSlider [
28
+ < lwExample: ' Slider to set any time of day' >
29
+ | aLWAnalogClock range |
30
+ aLWAnalogClock := self new time: (Time seconds: 0 ).
31
+ range := LWBlockContainer new block: [ :h |
32
+ h div: {#width - > ' 100%' } with: [
33
+ h input: { #value - > 0 . #width - > ' 100%' .
34
+ #type - > ' range' . #min - > 0 . #max - > 43200 .
35
+ #style - > ' display: inline-block; width: 100%;' .
36
+ #oninput - > (Js call: [ :v | aLWAnalogClock time: (Time seconds: v asInteger) ] with: ' window.event.target.value' )}] ].
37
+ ^ LWContainer new
38
+ add: aLWAnalogClock;
39
+ add: range; yourself
40
+ ]
41
+
26
42
{ #category : #initialization }
27
43
LWAnalogClock >> initialize [
28
44
super initialize.
You can’t perform that action at this time.
0 commit comments