Using radio buttons to set an image in an image view
Using radio buttons to set an image in an image view
- Subject: Using radio buttons to set an image in an image view
- From: Martin Hawkins <email@hidden>
- Date: Tue, 22 Sep 2009 11:40:10 +0100
Hi,I want to display one of four images depending on the selection of a set
of four radio buttons with tags set to 0,1,2 and 3. The images are in the
project root with names one.jpg, two.jpg, etc.
I have declared an action in MyDocument called chooseAction and the NSMatrix
of radio buttons is connected in such a way that the chooseAction action can
detect the value of the tag. This works.
I can set the initial value of the image by using
actionImagePath = [NSMutableString stringWithString: @"/Users/.../one.jpg"];
// the full path is hard coded at the moment - worry about that later
as the value path for the image view is bound to actionImagePath.
What I cannot do is change the image. When I click on the second radio
button, I use
[actionImagePath setString:@"/Users/.../two.jpg"];
but the image does not change.
Any help with this would be gratefully received.
thnx
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden