bug-gnustep
[Top][All Lists]
Advanced

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

Re: NSTextField problems


From: Alexander Malmberg
Subject: Re: NSTextField problems
Date: Wed, 29 Jan 2003 14:03:30 +0100

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 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]