• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Adjusting appearance of dragImage?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Adjusting appearance of dragImage?
      • From: August Trometer <email@hidden>
    • Re: Adjusting appearance of dragImage?
      • From: Uli Kusterer <email@hidden>
  • Prev by Date: setControlView broken?
  • Next by Date: Localizing User Data
  • Previous by thread: Re: setControlView broken?
  • Next by thread: Re: Adjusting appearance of dragImage?
  • Index(es):
    • Date
    • Thread