KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Displaying picture with scroll bars.
PRODUCT: 4D Chart | VERSION: 2003 | PLATFORM: Mac & Win
Published On: August 12, 2004

You can use a picture variable object to display a picture on a form. However if the picture you want to display is bigger than the size of the picture variable and you want to display the picture with no size reduction, you cannot see the entire picture nor can you scroll it. The picture variable object does not allow you to put horizontal and vertical scroll bars. In this case, you can use a 4D Chart plug-in area to display the picture. Below is a sample code that will read a picture from a certain location and put the picture in the 4D chart plug-in area. The 4D Chart’s menu bar, tools, and rulers are hidden.

C_PICTURE(mpic1)
READ PICTURE FILE("";mpic1) `Open file dialog box to read picture
CT PICTURE TO AREA (pArea1;mpic1) `places picture into area
CT SET DISPLAY (pArea1;1;0) ` Hide 4D Chart menu bar
CT SET DISPLAY (pArea1;2;0) ` Hide Chart Tools
CT SET DISPLAY (pArea1;3;0) ` Hide Object Tools
CT SET DISPLAY (pArea1;9;0) ` Hide Rulers