Re: Is it possible to update a single tab of an NSTabView?
Re: Is it possible to update a single tab of an NSTabView?
- Subject: Re: Is it possible to update a single tab of an NSTabView?
- From: Adam Iser <email@hidden>
- Date: Tue, 17 Jul 2001 14:49:28 -0400
I've got the NSTimer set up, as well as the NSTabViewItem subclass.
Since my subclass ignores the label anyway (instead drawing it's own
status icon and string), it sounded like a good idea to call -setLabel
with an empty string. But calling -setLabel causes a redisplay of the
entire NSTabView! (even though the title hasn't changed length and there
is no need to redraw the contents).
It seems a little extreme for the system to update the entire tabview
(including it's contents) when all I've changed is a tab's title. I had
also hoped for some way to tell the system it shouldn't re-calcualte the
tab's width (since it didn't change).
At this point I'm considering handling the tabs on my own (with a
seperate view for each "tab", and manually hiding and showing the
individual panes). This would also let me left align the tabs
(something that I've wanted from day 1).
Any other suggestions?
-Adam Iser
Thanks for the help so far :)
NSTabViewItem's -view method will let you update the content view and
its -setLabel will change the title. As far as flashing, you may want
to change the label at timed intervals using NSTimer. You may also
want to subclass NSTabViewItem to display a label with an image or
whatnot else.