문제

I want to create a scrollview with a zooming control and a button next to the scrollbar. Sort of like the "tile window" button in XCode (top right corner of the editor), it should be in the same box that usually is used by the scrollbar only.

Do you have an idea of how to approach this?

I was thinking to use an NSScrollView and set the scrollbars to a custom subclass of NSScroller which includes the other widgets. What kinds of buttons use the same style as the scrollbar?

도움이 되었습니까?

해결책

Subclass NSScrollView and override -tile. You'll add the subviews on -init... or nib awake (or some other convenient time) and lay out the controls manually in your overridden -tile method. If you call [super tile] first, then adjust the bottom or right scroll bar to make room for your custom control(s), your job will be a lot easier.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top