To fill NSScrollview
with pattern image I use - (void)setBackgroundColor:(NSColor *)aColor
method where aColor
is created with + (NSColor *)colorWithPatternImage:(NSImage *)image
method. Despite of what isFlipped
returns for NSScrollView
and its content view, pattern start repeat from bottom-left corner while I want it to start from top-left corner. How can I achieve that?
views:
167answers:
1
+1
A:
I believe the key here may be that -setBackgroundColor: of the NSScrollView:
Sets the color of the content view’s background to aColor.
The content view of a NSScrollView is a separate view inside of the NSScrollView.
So, what you will probably need to do is be able to change the isFlipped of the content view of the NSScrollView.
I haven't played around with this yet, so I don't know what problems you may run into.
EDIT: However, it appears your answer may be found here:
Look near the bottom of the article.
ericgorr
2010-03-21 22:36:42