Re: Implementing a scrollable icon-table
Re: Implementing a scrollable icon-table
- Subject: Re: Implementing a scrollable icon-table
- From: Philip Dow <email@hidden>
- Date: Tue, 20 Dec 2005 13:25:20 +0100
Hi Dan,
It sounds like you're going to need to create a custom subclass of
NSView which handles the drawing of the icons in its drawRect:
method. If you want the user to be able to click an icon to select it
and do something with it, you'll need to override mouseDown: as well.
Once you have your nssubview class setup, you can allocate it in code
and the associate it with a scroll view. This isn't easy stuff, but
basically you'll need to make the subclasses frame bigger than the
viewing area for the scroll view, then use NSScrollView's
setDocumentView: to add it to the scroll. Scrolling should handle
itself after that.
-Phil
On Dec 20, 2005, at 1:12 PM, Dan Price wrote:
Hi – can someone point me in the right direction for
this?
I need to implement a scrollable icon-table for my
graphics app. Each shader in the app is represented by
a 100x100 pixel preview icon. I want the icons for all
of the shaders present displayed in a grid utility
window so that they can be selected and used. The
window view must be scrollable in case there are too
many icons to fit. Can this be done with a standard
tableview?
The icon-selector seen at the top of XCode’s settings
window is the closest example I’ve seen.
___________________________________________________________
To help you stay safe and secure online, we've developed the all
new Yahoo! Security Centre. http://uk.security.yahoo.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
_______________________________________________
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