New topic: ImageWell picture change
<http://forums.realsoftware.com/viewtopic.php?t=46642> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message carlfitzsimmons Post subject: ImageWell picture changePosted: Tue Jan 22, 2013 10:19 am Joined: Tue Sep 19, 2006 5:10 pm Posts: 173 I have an ImageWell that I use to display pictures of some products that either come in one color or more than one. So I am looking at a way to enable clicking on the image to place another picture in the ImageWell. All the images have a name that ends with black, white or they do not end in black or white if they only have one color and all images have been added to the Project Editor. i.e. Product1_White Product1_Black Product2 Product3_White Product3_Black Product3_Blue After the user selects a product from a ComboBox an image is displayed in the ImageWell. I was thinking of grabbing the name of the picture and doing something like this Dim pic_name As String pic_name = This_ImageWell.Name If InStr(0, pic_name, "White") > 1 Then Me.Name = Replace(pic_name, "White", "Black") ElseIf InStr(0, pic_name, "Black") > 1 Then Me.Name = Replace(pic_name, "Black", "White") End This_ImageWell.Visible = True and so on in the mouse up method to continue to change the picture when the user clicks on the ImageWell. Pic_Name returns 'This_ImageWell' which is the name of the ImageWell. I have read through the Language Reference for an ImageWell and have not found out how to get the picture name, modify it and then grab the newly renamed picture and display it in an ImageWell Is there a way to accomplish this or do I need to look in a different direction Thanks Top charonn0 Post subject: Re: ImageWell picture changePosted: Tue Jan 22, 2013 1:50 pm Joined: Mon Apr 02, 2007 2:08 am Posts: 1083 Location: San Francisco, CA, USA The ImageWell.Name property refers to the ImageWell itself rather than the picture it's displaying. Once you've assigned a picture to the ImageWell the name is not preserved by the ImageWell (you refer to it merely as ImageWell.Image.) You will need to store the current picture's name (or perhaps just a Boolean value representing black and white, e.g.) someplace else, such as in a property of the window _________________ Boredom Software Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml rbforumnotifier@monkeybreadsoftware.de