Re: Drawers
Re: Drawers
- Subject: Re: Drawers
- From: Angela Brett <email@hidden>
- Date: Tue, 11 Sep 2001 14:36:03 +1200
It definitely seems like the drawer is having some interference
between the time it draws the drawer and when it slides out from
behind the parent window. Is it just the text view that is black or
is it the entire drawer?
Just the text view, which takes up the entire drawer. Or at least, I
think that's what it is - most of the edges of the drawer display
okay, anyway. The top part of the textView which would have text on
it, and also the top edge of the drawer, is the colour that I've set
as the view's backgroundColor. The rest of it is black, and the text
isn't displayed.
This actually happens in two situations:
1) If I tell the drawer to open in the code straight after I've set
up the textView
2) If I don't tell the drawer to open in the code, but the drawer has
been opened before I've done anything the textView.
The drawer displays okay if I don't tell it to open in the code, and
haven't previously opened the drawer, but I open the drawer (via a
menu item) after the text has been put into the textView.
Do you set you content view programaticlly or through IB?
Through IB, although I have also tried setting it programmatically as well.
If all else fails, send a the offending piece of code to the list
and maybe someone can figure it out by looking at the code. Good
luck.
Okay, well here is the shortest version of the method, minus all the
things I've added to try to get it to work which haven't made any
difference. There's probably something blaringly obvious in here
which people who've used drawers before will notice... who knows.
Because I'll be using the drawer to display a high score list, the
drawer is named scawer, and the textView (which is connected straight
to the highScoreController object in IB, although I could get it
using [scawer contentView]) is named scawerView - not the most
intuitive of names but it's just my little project. :)
- (void)displayScores {
[scawerView setTextColor:[NSColor blackColor]];
[scawerView setBackgroundColor:[NSColor controlColor]];
[scawerView setString:@"Test string, 1 2 3..."];
[scawerView display];
[scawer open]; //if I don't have that line there, and open
the drawer via a menu, it works
}
--
Angela Brett email@hidden
http://acronyms.co.nz/
"Great minds think different."