Documentation component by D.Glodt (c)2004

Appendix A: QImageBox


QImageBox Component

QImageBox is a component used to view image file.
This component use the dll NVIEWLIB to view the files type jig,gif,jpg,pcx,tga,dib,rle ,if this dll is not
present in system or in your application directory , only types bmp,ico,cur,ani will be
view.

QImageBox Properties

Field

Type

R/W

Default


Progress

BOOLEAN

R/W

FALSE

Show progress bar for image type from dll NVIEWLIB

FileName

STRING

R/W

File name selected with full path

ImgWidth

INTEGER

R

Image width

ImgHeight

INTEGER

R

Image height

Language

STRING

R/W

Langage for dll.
(French,English,German,Dutch,Portuguese,Spanish,Japanese,Italian)

QImageBox Methods

Method

Type

Description

Params






QImageBox Events

Event

Type

Occurs when...

Params






QImageBox Example
$TypeCheck On
$Include "rapidq.inc"
$Include "Object\QImageBox.inc"

declare Sub FileSelect

CREATE Form ASQFORM
    Caption = "Image Viewer"
    Width=300
    Height=300
    Center
    CREATE image ASQImageBox
      Language="french"
      color=clAppWorkSpace
      Progress=true
      Align=AlClient
      width=200
    END CREATE
    CREATE btSelect AS QBUTTON
      Align=AlBottom
      Caption="&Select image"
      OnClick=FileSelect
    END CREATE
END CREATE
Form.ShowModal

Sub FileSelect
  dim OpenDlg asQOpenDialog

  OpenDlg.filter="Image(*.bmp;*.ico;*.ani;*.cur*.gif;*.jpg)|*.bmp;*.ico;*.ani;*.cur*.gif;*.jpg"
  if OpenDlg.execute()then image.Filename=OpenDlg.Filename
End Sub

Hosted by uCoz