Re: NSSearchField in toolbar strange drawing
Re: NSSearchField in toolbar strange drawing
- Subject: Re: NSSearchField in toolbar strange drawing
- From: Fredrik Olsson <email@hidden>
- Date: Wed, 12 Jul 2006 08:19:08 +0200
I. Savant skrev:
You'll want to post this online so anyone from the list can help
you. One thing I can suggest is using a regular NSToolbarItem. For one
thing, you declare "searchItem" as an NSToolbarItem, then *allocate*
an MTValidatedToolbarItem (whatever that is - I haven't heard of it).
I would just try it with a standard NSToolbarItem first and see if
that fixes anything. Even if it doesn't, you should still be declaring
it as an MTValidatedToolbarItem if you're going to create one.
MTValidatedToolbarItem is my own subclass, all it does is allowing
validation for toolbar items with views using the
NSUserInterfaceValidations protocol. The drawing is still strange even
without it. I have tried skipping it going straight for NSToolbarItem,
just to make sure, but it stills draws wrong.
Also, how have you hooked up the NSSearchView in the nib? Did you
instantiate a search view (so that it appears in the list that
contains FirstResponder, your window, etc.) and hook it directly or
did you embed it in a view? Please describe this.
It is embedded in a view. Should I instantiate it directly? And how
would I do that, dragging to the window does not work for me?
// Fredrik Olsson
--
I.S.
On Jul 11, 2006, at 2:24 AM, Fredrik Olsson wrote:
I. Savant skrev:
Post the code you used to do so.
NSToolbarItem *searchItem = [[MTValidatedToolbarItem alloc]
initWithItemIdentifier:@"Search"];
[searchItem setLabel:MTLocalizedString(@"Search")];
[searchItem setPaletteLabel:[searchItem label]];
[searchItem setView:searchView];
[searchItem setMinSize:NSMakeSize(96.0, 32.0)];
[searchItem setMaxSize:NSMakeSize(192.0, 32.0)];
[items setObject:searchItem forKey:@"Search"];
searchView is a the hooked up NSSearchView from nib. I Have also
tried min and max height as 22, and 19. But then it crops the
drawing, and still writes text misaligned.
// Fredrik Olsson
--I.S.
On Jul 10, 2006, at 10:10 AM, Fredrik Olsson wrote:
When placing a NSSearchField in a toolbar I get strange drawing
when the control is not key control. If I type in it, it draws as
it should.
What is going on?
// Fredrik Olsson
<NSSearchField.png>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden