Hello and a question bout TextFieldMorph

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Hello and a question bout TextFieldMorph

Javier Reyes
Hello Everyone,

My name is Javier Reyes and I have just subscribed to this mailing list. I live and work in Madrid, Spain.

I am developing an pplication for a Magazine using Squeak. For a small text box (which describes the contents of a page in the magazine) I use a TextFieldMorph. Once initialized the Morph appears with an 'abc' text in the upper left corner. That's fine for me. My problem comes when i delete the last character of the TextMorph. At that moment the Morph changes its color to the default light gray but the text that's written after that doesnt appear in the top left corner anymore but one line below.
If I press Alt-0 the text goes back to the corner, but I want that behaviour to be default. This "reset" doesnt happen either if I select the "abc" and write some replacement text, only when the TextFieldMorph is emptied.

Any help will be very welcome. Thanks in advance.

All the best,
                       -Javier


Reply | Threaded
Open this post in threaded view
|

Re: Hello and a question bout TextFieldMorph

karl-8
Javier Reyes skrev:

> Hello Everyone,
>
> My name is Javier Reyes and I have just subscribed to this mailing
> list. I live and work in Madrid, Spain.
>
> I am developing an pplication for a Magazine using Squeak. For a small
> text box (which describes the contents of a page in the magazine) I
> use a TextFieldMorph. Once initialized the Morph appears with an 'abc'
> text in the upper left corner. That's fine for me. My problem comes
> when i delete the last character of the TextMorph. At that moment the
> Morph changes its color to the default light gray but the text that's
> written after that doesnt appear in the top left corner anymore but
> one line below.
> If I press Alt-0 the text goes back to the corner, but I want that
> behaviour to be default. This "reset" doesnt happen either if I select
> the "abc" and write some replacement text, only when the
> TextFieldMorph is emptied.
>
> Any help will be very welcome. Thanks in advance.
Does this help

text _ TextFieldMorph new openInWorld.
tm _ text findA: TextMorph.
tm autoFit: false.

Karl


Reply | Threaded
Open this post in threaded view
|

Re: Hello and a question bout TextFieldMorph

Javier Reyes
Hello Karl,
 
Yes it does. Thanks very much and happy new year. :)
 
                     -Javier
 
On 1/8/07, karl <[hidden email]> wrote:
Javier Reyes skrev:

> Hello Everyone,
>
> My name is Javier Reyes and I have just subscribed to this mailing
> list. I live and work in Madrid, Spain.
>
> I am developing an pplication for a Magazine using Squeak. For a small
> text box (which describes the contents of a page in the magazine) I
> use a TextFieldMorph. Once initialized the Morph appears with an 'abc'
> text in the upper left corner. That's fine for me. My problem comes
> when i delete the last character of the TextMorph. At that moment the
> Morph changes its color to the default light gray but the text that's
> written after that doesnt appear in the top left corner anymore but
> one line below.
> If I press Alt-0 the text goes back to the corner, but I want that
> behaviour to be default. This "reset" doesnt happen either if I select
> the "abc" and write some replacement text, only when the
> TextFieldMorph is emptied.
>
> Any help will be very welcome. Thanks in advance.
Does this help

text _ TextFieldMorph new openInWorld.
tm _ text findA: TextMorph.
tm autoFit: false.

Karl