Re: Finder Eject Button in OutlineView
Re: Finder Eject Button in OutlineView
- Subject: Re: Finder Eject Button in OutlineView
- From: kiran Sanka <email@hidden>
- Date: Thu, 4 Sep 2008 19:32:39 -0700
Hi Corbin,
Thanks you very much . This is the one I Was looking for .
On Sep 2, 2008, at 8:41 AM, Corbin Dunn wrote:
On Sep 1, 2008, at 4:25 PM, kiran Sanka wrote:
I am trying to figure out how I might be able to do something like
Finder does displaying disc Eject Image(When disc inserted)
indicator as part of an outline item.
I did by customizing NSTextField Cell as below
- (void) drawWithFrame:(NSRect)inRect inView:(NSView *)inView
{
// First we split the cell in two
NSRect textFrame, imageFrame;
NSDivideRect (inRect, &imageFrame, &textFrame, 3.0f + [urlIcon
size].width, NSMaxXEdge);
if([self icon] != nil)
{
NSPoint imageLocation = NSMakePoint( NSMidX(imageFrame),
NSMidY(imageFrame) );
imageLocation.x -= [urlIcon size].width/2.0f;
imageLocation.y -= [urlIcon size].height/2.0f;
// Draw the Disc Eject image
if ([[NSGraphicsContext currentContext] isDrawingToScreen])
{
if ([[self stringValue] length]) {
[urlIcon drawAtPoint:imageLocation
fromRect:NSMakeRect( 0, 0, [urlIcon size].width, [urlIcon
size].height )
operation:NSCompositeSourceOver
fraction:1.0f];
}
}
[super drawWithFrame:textFrame inView:inView];
}
// Let our super do what it does best
[super drawWithFrame:inRect inView:inView];
}
But when mouse roll over to discEjectImage i would like set another
image like finder EjectImage.But i dont know how to work out with
mouseEntered and mouseMove in a particular cell of an outlineView
I'd be grateful is someone could push me in the right direction.
Sure,
http://developer.apple.com/samplecode/PhotoSearch/index.html
-corbin
kiran Sanka
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden