Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: HIImageViewSetImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HIImageViewSetImage




On Oct 29, 2006, at 10:35 PM, Claude Biron wrote:


The following code succeeds in placing a .pct image in an HImage control;
however, I need to alternate between two images representing a state. I've
tried calling HIImageViewSetImage with both images, then using
HIViewGetNextView(myHIView) to cycle through them, but isn't doing the
trick. How can I replace the image set with HIImageViewSetImage with another
one? I tried first using that call with the other image, but I can't make
it replace the original one (and yes...I checked MacWindow.h, but it's not
there ;-) ).

Well no, it wouldn't be. It isn't a window issue. ;-)

Did you try calling HIViewSetNeedsDisplay to tell the system the view needs to be redrawn after setting a new image? (See HIView.h :-)

Larry

  BTW The goal is to have a status image on the main window
(i.e. USB modem in, USB modem out).




HIViewRef myHIView=NULL;

    HIViewFindByID(HIViewGetRoot(window), myHIViewID, &myHIView);
    CGImageRef splashImage = LoadImageQT(inName);
    err = HIImageViewSetImage(myHIView, splashImage);
    CGImageRelease(splashImage);


_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >HIImageViewSetImage (From: Claude Biron <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.