NSWindow setShowsResizeIndicator not working

  • Hi,

    I have tried creating a NSWindow programmatically with [window
    setShowsResizeIndicator:YES]; but it does not show the indicator? Any
    clue?

    Regards
    Sanjay
  • Snow Leopard was the last version to have a visible grow zone; which OS are you on?

    ----- Original Message -----
    From: "Sanjay Arora" <saarora...>
    To: <cocoa-dev...>
    Sent: Sunday, July 1, 2012 11:36:42 PM
    Subject: NSWindow setShowsResizeIndicator not working

    Hi,

    I have tried creating a NSWindow programmatically with [window
    setShowsResizeIndicator:YES]; but it does not show the indicator? Any
    clue?

    Regards
    Sanjay
  • I am on Lion. Any alternatives?

    -----Original Message-----
    From: Lee Ann Rucker [mailto:<lrucker...>]
    Sent: 02 July 2012 12:56 PM
    To: Sanjay Arora
    Cc: <cocoa-dev...>
    Subject: Re: NSWindow setShowsResizeIndicator not working

    Snow Leopard was the last version to have a visible grow zone; which OS are you on?

    ----- Original Message -----
    From: "Sanjay Arora" <saarora...>
    To: <cocoa-dev...>
    Sent: Sunday, July 1, 2012 11:36:42 PM
    Subject: NSWindow setShowsResizeIndicator not working

    Hi,

    I have tried creating a NSWindow programmatically with [window
    setShowsResizeIndicator:YES]; but it does not show the indicator? Any
    clue?

    Regards
    Sanjay
  • On Jul 2, 2012, at 12:45 AM, Sanjay Arora <saarora...> wrote:

    > I am on Lion. Any alternatives?

    No, because Lion allows you to resize windows from any edge. The resize indicator wouldn't make any sense.

    --Kyle Sluder
  • Below is my code that overlays a control on the horizontal scrollbar.

    (void)tile {
    [super tile];
    if (subControl) {
      NSRect subControlFrame = [subControl frame];
      NSScroller *horizontalScroller = [self
    horizontalScroller];

      NSRect scrollerFrame = [horizontalScroller frame];
      // adjust control position here in the scrollview
    coordinate space
      subControlFrame.origin.x = scrollerFrame.origin.x;
      subControlFrame.origin.y = scrollerFrame.origin.y;
      subControlFrame.size.height = scrollerFrame.size.height;
      // move controls
      [subControl setFrame:subControlFrame];

      NSRect subControlFrame2 = [subControl frame];

      scrollerFrame.origin.x += subControlFrame2.size.width;
      scrollerFrame.size.width -= subControlFrame2.size.width;

            [horizontalScroller setFrame:scrollerFrame];
      }
    }


    After the line
        [subControl setFrame:subControlFrame];

    it stops responding to system preferences??

    Regards
    Sanjay
  • There's some complicated behind-the-scenes stuff in NSScrollView et al to avoid breaking apps that put extra stuff in the horizontal scroll zone because with some of the new style settings the scroll zone size is highly variable in both dimensions.  Wouldn't surprise me if there's code to detect a setFrame on the horizontal scroller and mark the scrollview as being legacy style. I'm pretty sure one of the Lion WWDC sessions advised against doing this in the future.

    I have a custom scroll view and it has two tile methods: one for NSScrollerStyleLegacy/10.6 and earlier, and one for overlay style; only the legacyTile one adjusts the horizontal scroller frame. It adds a secondary subview to the scrollview itself, if you're interested - it might work for your UI to have the extra widgets in their own view instead of sharing space with the scroller.

    NSScroller is set up to be subclassed and tell OSX it knows how to handle new scrollbars - see [NSScroller isCompatibleWithOverlayScrollers] - so there's another way to add things to the scroller area.

    ----- Original Message -----
    From: "Sanjay Arora" <saarora...>
    To: <cocoa-dev...>
    Sent: Wednesday, July 4, 2012 12:45:01 AM
    Subject: NSScrollView does not honor system preferences for scroll bars    ("when scrolling"), when I override the -tile method.

    Below is my code that overlays a control on the horizontal scrollbar.

    (void)tile {
    [super tile];
    if (subControl) {
      NSRect subControlFrame = [subControl frame];
      NSScroller *horizontalScroller = [self
    horizontalScroller];

      NSRect scrollerFrame = [horizontalScroller frame];
      // adjust control position here in the scrollview
    coordinate space
      subControlFrame.origin.x = scrollerFrame.origin.x;
      subControlFrame.origin.y = scrollerFrame.origin.y;
      subControlFrame.size.height = scrollerFrame.size.height;
      // move controls
      [subControl setFrame:subControlFrame];

      NSRect subControlFrame2 = [subControl frame];

      scrollerFrame.origin.x += subControlFrame2.size.width;
      scrollerFrame.size.width -= subControlFrame2.size.width;

            [horizontalScroller setFrame:scrollerFrame];
      }
    }


    After the line
        [subControl setFrame:subControlFrame];

    it stops responding to system preferences??

    Regards
    Sanjay
previous month july 2012 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today