How can I "highlight" user interface objects?
How can I "highlight" user interface objects?
- Subject: How can I "highlight" user interface objects?
- From: Jerry LeVan <email@hidden>
- Date: Sat, 16 Nov 2002 11:46:26 -0500
Hi,
I am trying to add some "spit and polish" to my *first* Cocoa application, a
CSV file editor.
I want to drag a file using the Finder onto my open application and use the
supplied file to view in the application. ( It is a single window
application).
Any way, before I attempt to implement the dragging destinations stuff I
thought I would try to determine how to draw a green/blue/whatever rectangle
around a user interface object.
I built a small app with a text scrollview ,a colorit button and an
uncolorit button.
I had hoped to press the colorit button and have the frame of the scrollview
rendered as a red rectangle, the uncolorit button is supposed to undo the
damage.
I thought something like this might help:
- (IBAction)colorAction:(id)sender
{
NSRect bounds = [scrollViewWindow frame];
[[NSColor redColor] set];
[NSBezierPath strokeRect:bounds];
}
Of course nothing(visible) happens when the button action is invoked...
Any suggestions?
Thanks,
Jerry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.