' Rapid-Q by William Yu (c)1999-2000 . ' ================================================================================ ' Upload_il_tuo_script_su_Rapidq.it ' Qimagelist ****** QIMAGELIST Component ****** QImageList is an array of images, all of the same/fixed size. QImageList Properties Field Type R/W Default =================== =================== =================== =================== BkColor INTEGER RW clNone 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. BlendColor INTEGER RW clNone 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. Count INTEGER R Count returns the number of images in the imagelist. DrawingStyle INTEGER RW dsNormal 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. GetBMP ARRAY of IMAGES/BMP R 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) GetICO ARRAY of IMAGES/ICO R Handle INTEGER RW Height INTEGER RW ImageType INTEGER RW itImage ImageType determines whether the imagelist will use the image or the associated image mask when drawing. Masked INTEGER RW True Masked specifies whether the imagelist contains transparent or non-transparent images. Width INTEGER RW QImageList Methods Method Type Description Params =================== =================== =================== =================== AddBMPFile SUB (FileName$, Add BMP file to 2 MaskColor%) Imagelist AddICOFile SUB (FileName$) Add Icon file to 1 Imagelist AddBMPHandle SUB (BMP_Resource, Add BMP to 2 MaskColor%) Imagelist AddICOHandle SUB (ICO_Resource) Add Icon to 1 Imagelist Clear SUB Removes all images 0 Delete SUB (Index%) Delete image at 1 Index% SUB (QIMAGE/ Draw on canvas at Draw QBITMAP/QCANVAS/ (X,Y) with image 4 QDXSCREEN, X%, Y%, index% in ImageList Index%) InsertBMPFile SUB (Index%, Insert BMP file at 3 Filename$, Mask%) Index% InsertICOFile SUB (Index%, Insert Icon file at 2 Filename$) Index% SUB (Index%, Insert BMP at InsertBMPHandle BMP_Resource, Index% 3 Mask%) InsertICOHandle SUB (Index%, Insert Icon at 2 ICO_Resource) Index% 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 ' =============================================================================== ' 2003 Holyguard.net - 2007_Abruzzoweb