On 1 juin 2013, at 10:26, plantec <alain.plan...@yahoo.com> wrote:

> 
> On 1 juin 2013, at 01:25, Alexandre Bergel <alexandre.ber...@me.com> wrote:
> 
>> Would it be possible to have an element of the text responsive to some 
>> interaction? For example, if in my text field I enter the value 100. Can I 
>> click on it (and remain the mouse button down) and move the mouse to 
>> increase or decrease this numerical value?
> 
> | area seg blk |
> area := RubEditingArea new beWrapped; withoutSelectionBar.
> area setTextWith: 'Click on 0'.
> seg := RubPlainSegmentMorph inTextArea: area from: 10 to: 11.
> blk := [ seg replaceTextWith: (seg text string asNumber + 1) asString].
> seg on: #mouseDown send: #value to: blk.
> seg on: #mouseStillDown send: #value to: blk.
> seg beExtendable.
> area addSegment: seg.
> area openInWorld

now I imagine that with TxMorph it should be possible to 
insert whatever morph at a given place instead of a RubPlainSegmentMorph. :)

Cheers
Alain



> 
> 
> Alain
> 
>> 
>>> 
>> 
>> -- 
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>> 
>> 
>> 
>> 
> 


Reply via email to