Adjusting appearance of dragImage?
Adjusting appearance of dragImage?
- Subject: Adjusting appearance of dragImage?
- From: desktoast music productions <email@hidden>
- Date: Sat, 15 Apr 2006 14:48:38 +0200
Hi,
In my subclass of NSTableView I use the following override to add a nice
blue border to the dragImage of dragged rows:
- (NSImage *)dragImageForRows:(NSArray *)dragRows event:(NSEvent *)dragEvent
dragImageOffset:(NSPointPointer)dragImageOffset {
NSImage *newDragImage;
NSSize s;
NSRect imageBounds;
newDragImage = [super dragImageForRows:dragRows event:dragEvent
dragImageOffset:dragImageOffset];
s = [newDragImage size];
imageBounds.origin = NSMakePoint(0,0);
imageBounds.size = s;
[newDragImage lockFocus];
[[NSColor keyboardFocusIndicatorColor] set];
[NSBezierPath setDefaultLineWidth:3.0];
[NSBezierPath strokeRect:imageBounds];
[newDragImage unlockFocus];
return newDragImage;
}
But, due to the overall design of my app, I¹d prefer the whole background of
the dragImage colored. I tried over and over but
all invocations of setBackgroundcolor: on newDragImage refuse to work
(background stays transparent). My (newbie)question is: Is there a way to
set the background color within this method? Or do I have to put up my row¹s
dragImage from scratch?
--
peter schwaiger
desktoast music productions
http://www.autlawmusic.com
_______________________________________________
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