bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField problems


From: Enrico Sersale
Subject: Re: NSTextField problems
Date: Wed, 29 Jan 2003 16:37:18 +0200 (EET)

On Wed, 29 Jan 2003, Alexander Malmberg wrote:

> Enrico Sersale wrote:
> >
> > > ...
> > >
> > > By the way, exceptions and NSLog messages are gone while typing. Text
> > > is visible if text fits into textfield. Thanks Alexander.
> > >
> > > GWorkspace textfield's text still disappears after clicking on file name
> > > (textfield is set editable).
> >
> > This happens beacause they are center aligned.
> > Even if you click, for example, in the middle of the text, the cursor goes
> > before the first char and *here* what you type is added.
>
> I've tracked this down to [NSCell -_setupTextWithFrame:inView:editor:],
> which sets the width of the field editor's text container to 3000. Thus,
> text is centered around 1500, which is far outside the visible part of
> the field editor.

I'm not sure that this is the explication, because:
1) if I click in the field the text dishappears.
2) now, if I press leftArrow *only a time*, the first character appears at
the right side of the field.

This means that the text is not centered at 1500, but at
[field frame]size.width + ([text frame]size.width / 2)

> I assume that the width is set this high to get text fields to scroll
> when edited, but obviously, it isn't working when text is centered (or
> right-aligned, I assume). I'm not really sure what behavior we want
> here. Is the auto-scrolling supposed to take care of this, or should the
> width be set to the width of the cell? Should we ignore the cell's
> alignment when setting up the field editor?
>
> (Also, if the width is supposed to be "infinite", I don't see why it's
> set to such a low value.)
>
> - Alexander Malmberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]