Guidance
指路人
g.yi.org
software / RapidQ / RQ Doc / html / qimagelist.html

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Appendix A: QIMAGELIST
Rapid-Q Documentation by William Yu (c)1999-2000 Appendix A: QIMAGELIST


QIMAGELIST Component

QImageList is an array of images, all of the same/fixed size.

QImageList Properties
FieldTypeR/WDefault




BkColorINTEGERRWclNone
BkColor determines which background color to use when drawing an image. Setting BkColor to clNone specifies no background color, ie. the image is drawn transparently. Setting BkColor to clDefault specifies using the imagelists background color when drawing.
BlendColorINTEGERRWclNone
BlendColor determines which foreground color to use when drawing an image. Setting BlendColor to clNone specifies no blend color, while setting BlendColor to clDefault specifies the system highlight color for the foreground.
CountINTEGERR
Count returns the number of images in the imagelist.
DrawingStyleINTEGERRWdsNormal
DrawingStyle specifies the style to be used when the imagelist is drawing an image.
0 = dsFocused -- Draws the image blending 25% with the system highlight color. This only affects imagelists which contain masks.
1 = dsSelected -- Draws the image blending 50% with the system highlight color. This only affects imagelists which contain masks.
2 = dsNormal -- Draws the image using the color specified in the BkColor property. If the BkColor is clNone then the image is drawn transparently using the mask.
3 = dsTransparent -- Draws using the mask regardless of the BkColor setting.
GetBMPARRAY of IMAGES/BMPR
GetBMP returns the image specified by their index.
Examples:
DIM ImageList AS QIMAGELIST
DIM Button AS QBUTTON

ImageList.AddBMPFile("whatever.bmp", 0)
Button.BMP = Imagelist.GetBMP(0)
GetICOARRAY of IMAGES/ICOR
HandleINTEGERRW
HeightINTEGERRW
ImageTypeINTEGERRWitImage
ImageType determines whether the imagelist will use the image or the associated image mask when drawing.
MaskedINTEGERRWTrue
Masked specifies whether the imagelist contains transparent or non-transparent images.
WidthINTEGERRW

QImageList Methods
MethodTypeDescriptionParams




AddBMPFileSUB (FileName$, MaskColor%)Add BMP file to Imagelist2
AddICOFileSUB (FileName$)Add Icon file to Imagelist1
AddBMPHandleSUB (BMP_Resource, MaskColor%)Add BMP to Imagelist2
AddICOHandleSUB (ICO_Resource)Add Icon to Imagelist1
ClearSUBRemoves all images0
DeleteSUB (Index%)Delete image at Index%1
DrawSUB (QIMAGE/QBITMAP/QCANVAS/QDXSCREEN, X%, Y%, Index%)Draw on canvas at (X,Y) with image index% in ImageList4
InsertBMPFileSUB (Index%, Filename$, Mask%)Insert BMP file at Index%3
InsertICOFileSUB (Index%, Filename$)Insert Icon file at Index%2
InsertBMPHandleSUB (Index%, BMP_Resource, Mask%)Insert BMP at Index%3
InsertICOHandleSUB (Index%, ICO_Resource)Insert Icon at Index%2


QImageList Examples
' Imagelist demo

$resource bmp_handle as "nolight.bmp"
$resource ico_handle as "close.ico"

DIM ImageList AS QImageList
DIM Form AS QForm
DIM Button AS QButton

ImageList.Width = 9
ImageList.Height = 17
ImageList.AddBMPHandle bmp_handle,0
'ImageList.AddBMPFile "nolight.bmp", 0
ImageList.AddICOHandle ico_handle
'ImageList.AddICOFile "close.ico"

Button.Parent = Form
Button.BMP = Imagelist.GetBMP(0)

Form.Icon = ImageList.GetICO(1)

Form.Showmodal

Prev Component Contents Next Component
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-4-19  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2015-12-25 19:42:38