New topic: Scrollbar for Imagewell - HOW ???
<http://forums.realsoftware.com/viewtopic.php?t=45691> Page 1 of 1 [ 7 posts ] Previous topic | Next topic Author Message RickYerex Post subject: Scrollbar for Imagewell - HOW ???Posted: Tue Oct 23, 2012 12:53 pm Joined: Tue Nov 29, 2011 12:50 pm Posts: 74 I have various pictures that I am displaying in an imagewell based on user selection (see http://forums.realsoftware.com/viewtopic.php?f=1&t=45681) Some pictures fit the size of the Imagewell and others are larger .... width is ok but length is longer than the height of the screen (monitor screen). How can I display these and allow the user to be able to scroll the height of the longer ones? Top Bob Keeney Post subject: Re: Scrollbar for Imagewell - HOW ???Posted: Tue Oct 23, 2012 1:43 pm Joined: Fri Sep 30, 2005 11:48 am Posts: 3254 Location: Lenexa, KS There's nothing built-in to Real Studio to do this for you automatically but the code itself isn't too complicated. Use a canvas instead and add scrollbars and calculate where you're drawing the image in the canvas based on the scrollbar values. _________________ Bob K. Get true Word Processing in your Real Studio applications with Formatted Text Control at http://www.bkeeney.com/products/formatted-text-control 36+ hours of Real Studio Video Training at http://www.bkeeney.com/ Real Studio Consulting http://www.bkeeney.com/consulting/real-studio-consulting Top RickYerex Post subject: Re: Scrollbar for Imagewell - HOW ???Posted: Tue Oct 23, 2012 3:38 pm Joined: Tue Nov 29, 2011 12:50 pm Posts: 74 Bob Keeney wrote:There's nothing built-in to Real Studio to do this for you automatically but the code itself isn't too complicated. Use a canvas instead and add scrollbars and calculate where you're drawing the image in the canvas based on the scrollbar values. Weeeeel ... that works BUT .... I have 170 different picture files that the user can choose from to display. These are all stored on the hard drive. I display them in the Imagewell based on a code connected to the file name. In order to accomplish the same using a canvas, it appears I would have to bring all those pictures into the Project in order to reference them based on the sample code I found in the help. (g.DrawPicture myPicture,Xscroll,Yscroll) Top Jym Post subject: Re: Scrollbar for Imagewell - HOW ???Posted: Tue Oct 23, 2012 4:24 pm Joined: Sat Oct 01, 2005 5:19 pm Posts: 3163 I wouldn't because I wouldn't want to reference them, I'd just use folder somewhere and read them in 1 at a time. Top npalardy Post subject: Re: Scrollbar for Imagewell - HOW ???Posted: Tue Oct 23, 2012 4:34 pm Real Software Engineer Joined: Sat Dec 24, 2005 8:18 pm Posts: 7499 Location: Canada, Alberta, Near Red Deer RickYerex wrote:Bob Keeney wrote:There's nothing built-in to Real Studio to do this for you automatically but the code itself isn't too complicated. Use a canvas instead and add scrollbars and calculate where you're drawing the image in the canvas based on the scrollbar values. Weeeeel ... that works BUT .... I have 170 different picture files that the user can choose from to display. These are all stored on the hard drive. I display them in the Imagewell based on a code connected to the file name. In order to accomplish the same using a canvas, it appears I would have to bring all those pictures into the Project in order to reference them based on the sample code I found in the help. (g.DrawPicture myPicture,Xscroll,Yscroll) That's ONE way to do it But you can load & display a picture in a canvas nearly the same way you can for an image well _________________ My web site Great White Software RBLibrary.com REALbasic learning Top RickYerex Post subject: Re: Scrollbar for Imagewell - HOW ???Posted: Tue Oct 23, 2012 5:17 pm Joined: Tue Nov 29, 2011 12:50 pm Posts: 74 npalardy wrote:That's ONE way to do it But you can load & display a picture in a canvas nearly the same way you can for an image well That's wonderful ... now if only someone would explain how (how to write the code)? Top RickYerex Post subject: Re: Scrollbar for Imagewell - HOW ???Posted: Tue Oct 23, 2012 5:36 pm Joined: Tue Nov 29, 2011 12:50 pm Posts: 74 I scrapped both the ImageWell and Canvas ideas and used an HTMLViewer. Has both vertical and horizontal scroll bars and works great and I don't have to deal with text-to-picture converting code. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 7 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 [email protected]
