FutureBasic Logo

<<    Index    >> FutureBasic

ImageView   statement / function



Statement syntax
imageview tag, enabled, image, rect, scaling, alignment, frameStyle, wndTag

Function syntax
image = imageview(tag)

Description
The imageview statement puts a new imageview in the current output window, or alters an existing imageview's characteristics. The imageview function returns the image in the view as an ImageRef and is equivalent to calling fn ImageViewImage.

Parameters
Parameter
Description
tag A number (1 through 1000000) that you assign when you create the imageview and that you refer to when altering the view. The number you assign must be different from the tag value of all other existing widgets in the current window. A negative tag hides the imageview.
enabled A boolean value which specifies whether the imageview should be enabled or disabled.
image This parameter can be NULL or one of the following:
  • The name of (or path to) an image resource
  • An ImageRef (NSImage)
  • rect The imageview's enclosing rectangle. This can be specified in either of two ways:
    (i) (x,y,w,h) where x,y are the origin and w,h the size of the view.
    (ii) A CGRect value
    scaling The scaling mode applied to make the cell's image fit the frame of the imageview:
    NSImageScaleProportionallyDown (default)
    NSImageScaleAxesIndependently
    NSImageScaleNone
    NSImageScaleProportionallyUpOrDown

    alignment The alignment of the cell's image inside the imageview:
    NSImageAlignCenter (default)
    NSImageAlignTop
    NSImageAlignTopLeft
    NSImageAlignTopRight
    NSImageAlignLeft
    NSImageAlignBottom
    NSImageAlignBottomLeft
    NSImageAlignBottomRight
    NSImageAlignRight

    frameStyle The style of the frame that appears around the image:
    NSImageFrameNone (default)
    NSImageFramePhoto
    NSImageFrameGrayBezel
    NSImageFrameGroove
    NSImageFrameButton

    wndTag An optional parameter for when the imageview's window is not the current output window. Note specifying this parameter does not bring the window to the front or make it the output window.
     

    Dialog event
    _btnClick
     

    Apple documentation
    NSImageView