Question about NSScrollView
Hi all ! So I have a question on how to resolve a little issue I have with NSScrollView. I have created everything programmatically (a little exploration task to learn and understand how to do stuff without IB). I have an NSOutlineView enclosed in an NSScrollView (as recommended by documentation). All works good except for little thing. Since NSOutlineView is not populated, content area is empty, but vertical scroller knob is shown (horizontal not showed). Question: Why ? I googled for an answer and got some facts together but don't really know how to get to the solution to rectify the issue. Facts: Scroller in this situation is shown because NSOutlineView has NSTableHeader shown (instantiated). If I set NSOutlineView headerView to nil, it gets released and not shown in the NSScrollView, and then there is no scroller knob. But what if I want to have NSTableHeader ? Seams to me that if the headerView is ON, NSScrollView makes wrong calculation of how much is the content area big and how much should it be shown. I have been examining the documentation for NSScrollView and NSClipView and found couple of methods that has something to do regarding that but I don't know to make a use of them. If any one knows something which could point me to the solution it will be much appreciated. Thanks in advance. Bye. P.S. example picture in attachment inline: window.jpg Mario Kušnjer mario.kusn...@sb.t-com.hr +385957051982 mariokusnjer (at) Skype ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about NSScrollView
tell your NSScrollView to setAutoHidesScrollers:yes This should hide the scrollbars until needed. http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSScrollView_Class/Reference/Reference.html On Feb 19, 2010, at 3:10 AM, Mario Kušnjer wrote: Hi all ! So I have a question on how to resolve a little issue I have with NSScrollView. I have created everything programmatically (a little exploration task to learn and understand how to do stuff without IB). I have an NSOutlineView enclosed in an NSScrollView (as recommended by documentation). All works good except for little thing. Since NSOutlineView is not populated, content area is empty, but vertical scroller knob is shown (horizontal not showed). Question: Why ? I googled for an answer and got some facts together but don't really know how to get to the solution to rectify the issue. Facts: Scroller in this situation is shown because NSOutlineView has NSTableHeader shown (instantiated). If I set NSOutlineView headerView to nil, it gets released and not shown in the NSScrollView, and then there is no scroller knob. But what if I want to have NSTableHeader ? Seams to me that if the headerView is ON, NSScrollView makes wrong calculation of how much is the content area big and how much should it be shown. I have been examining the documentation for NSScrollView and NSClipView and found couple of methods that has something to do regarding that but I don't know to make a use of them. If any one knows something which could point me to the solution it will be much appreciated. Thanks in advance. Bye. P.S. example picture in attachment window.jpg Mario Kušnjer mario.kusn...@sb.t-com.hr +385957051982 mariokusnjer (at) Skype ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/intrntmn%40aol.com This email sent to intrn...@aol.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about NSScrollView
On 2010.02.19, at 11:43, Jack Carbaugh wrote: tell your NSScrollView to setAutoHidesScrollers:yes This should hide the scrollbars until needed. http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSScrollView_Class/Reference/Reference.html That's one of the solutions. But then I could also remove headerView and evade the problem in the first place. What would be solution if I want to have vertical scroller visible ? I'm thinking more in the way of somehow recalculating contentView area before it gets send to the NSClipView to be displayed. Correct ? Wrong? Thanks for suggestions. Mario Kušnjer mario.kusn...@sb.t-com.hr +385957051982 mariokusnjer (at) Skype ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about NSScrollView
If you review the documentation, it tells you how to show either the vertical or the horizontal scroller. On Feb 19, 2010, at 6:13 AM, Mario Kušnjer wrote: On 2010.02.19, at 11:43, Jack Carbaugh wrote: tell your NSScrollView to setAutoHidesScrollers:yes This should hide the scrollbars until needed. http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSScrollView_Class/Reference/Reference.html That's one of the solutions. But then I could also remove headerView and evade the problem in the first place. What would be solution if I want to have vertical scroller visible ? I'm thinking more in the way of somehow recalculating contentView area before it gets send to the NSClipView to be displayed. Correct ? Wrong? Thanks for suggestions. Mario Kušnjer mario.kusn...@sb.t-com.hr +385957051982 mariokusnjer (at) Skype = ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com