Search the Community
Showing results for tags 'Imagelist'.
-
I am dynamically creating a TUniTabSheet and setting the ImageIndex := 0 to for a TUniNativeImageList that has already been assigned to an existing TUniPageControl. When I do this I am getting an AV in the following source code: function TUniCustomPageControl.GetImages: TUniCustomImageList; begin Result := FImages; end; I have attached a test project and am using UniGUI 1534 and Delphi XE2. TestTabSheet.zip
- 1 reply
-
- tunitabsheet
- imagelist
-
(and 1 more)
Tagged with:
-
-
uniTreeMenu does not load images added from a uniNativeImageList. What can I do to fix it? Error images
-
Hi, can you tell me the usage of "Images" property and "imageIndex" in DbGrid ? I have a table column with integers representing the index of the icon I want show from a UniImageList (Info,Warning,Error); can you explain how-to ? Regards
-
unit Convert To 32 Bitmap UniImage List Remove the round black icon unit ConvertTo32BitImageList; interface uses SysUtils, Graphics, Classes, Controls, ImgList, CommCtrl, Consts, uniImageList; procedure AddIconToUniImageList32bit(CountIcon: Integer; aUniImageList: TUniImageList); implementation procedure P_ConvertTo32BitImageList(const ImageList: TImageList); const Mask: array [Boolean] of Longint = (0, ILC_MASK); var TemporyImageList: TImageList; begin if Assigned(ImageList) then begin TemporyImageList := TImageList.Create(nil); try TemporyImageList.Assign(ImageList); with ImageList do begin ImageList.Handle := ImageList_Create(Width, Height, ILC_COLOR32 or Mask[Masked], 0, AllocBy); if not ImageList.HandleAllocated then begin raise EInvalidOperation.Create(SInvalidImageList); end; end; ImageList.AddImages(TemporyImageList); finally TemporyImageList.Free; end; end; end; procedure AddIconToUniImageList32bit(CountIcon: Integer; aUniImageList: TUniImageList); var ICO: Ticon; i: Integer; ImgList: TImageList; begin ImgList:=TImageList.Create(nil); try ImgList.Clear; P_ConvertTo32BitImageList(ImgList); for i := 0 to CountIcon do begin ICO := Ticon.Create; try if FileExists(ExtractFilePath(ParamStr(0))+'pic\' + IntToStr(i) + '.ico') then ICO.LoadFromFile(ExtractFilePath(ParamStr(0))+'pic\' + IntToStr(i) + '.ico') else exit; ImgList.AddIcon(ICO); finally ICO.Free; end; end; aUniImageList.Assign(ImgList); finally ImgList.Free; end; end; end. uses: AddIconToUniImageList32bit(3, UniImageList1); ShowMessage(IntToStr(UniImageList1.Count)); for i := 0 to 3 do begin UniTreeView1.items[i].ImageIndex := -1; // add this UniTreeView1.items[i].ImageIndex := UniImageList1.Count - UniImageList1.Count+i; end;
-
Alguém por favor poderia me ajudar a usar o imagelist? não estou sabendo usar. Abraço.