Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Working With Bitmap Images; Document-Based Application Redux
Subject:   validateScrollers question
Date:   2002-05-05 04:42:15
From:   sjmiller
As written, validateScrollers does not immediately remove the scrollers if the image is rescaled to fit within the current window. The area occupied by the scrollers is not updated. I partially fixed this by adding the following line to validateScrollers:


[[[self window] contentView] setNeedsDisplay:YES];


But, even with this line, the scrollers go away, but the pin striped background is not redrawn until you click on the resize area of the window. What am I missing?

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • validateScrollers question
    2002-10-03 02:50:15  stupidfish23 [View]

    just add the line

    [view validateScrollers];

    to your scaleImageTo: method.

    so it basically looks like:
    - (void)scaleImageTo:(float)_scale
    {
    if(_scale>0)
    scale=_scale;

    [view scaleFrameBy:scale];
    [zoomControl setFloatValue:(scale*100)];
    [view validateScrollers];
    }

    it works great for me.
    stupidFish23
  • validateScrollers question
    2002-05-06 13:06:36  michele [View]

    You don't miss anything. There's a bug in the framework.

    That's why I use
    :
    [[[self window] contentView] displayIfNeededIgnoringOpacity];

    Michèle