objective c - NSScrollView: Override system display settings? -
i have nsscrollview, set to:
mynsscrollview.hashorizontalscroller = yes; mynsscrollview.hasverticalscroller = yes; mynsscrollview.autohidesscrollers = yes; mynsscrollview.scrollerstyle = nsscrollerstyleoverlay;
i noticed when if there's no trackpad connecting os x, , default, nsscrollview
ignore settings in code , force scrollers shown:
i can either change system settings "when scrolling" or set hashorizontalscroller
etc. no
hide it, , later disable mouse scrolling not result want.
by default (automatically based on mouse or trackpad) display scroller if user has no trackpad, when content size not exceed frame size. if have trackpad, overlay style no matter scroller shows or not, it's above content.
the difference between 2 "legacy" style take spaces in scrollerview. it'd problem if relaying on visiablerect
value calculation, or contents needs remain aspect-ratio via constraints.
is there way force hide them without disabling them?
you have not been clear symptoms occur under circumstances. example, normal setting "show scroll bars:" in preference pane? want behavior of scrollers be? visible? show when scrolling?
in case, think issue misunderstanding autohidesscrollers
does. setting true means scrollers hidden when document view not extend past bounds of clip view (a.k.a. content view). if there's no place scroll because showing.
that property has nothing scrollers being visible or when scrolling or whatever. that's system setting can't override programmatically. scrollers behave same throughout apps in user session.
Comments
Post a Comment