Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
Ok, it looks like no bug to Delphi 2010, 2009…
If you use AddIcon the Icon will be added, but no item will be added.
If manually add icon also a item will be added.dirty workaround:
CODEFunction AddTIcon(var ImageList : TsAlphaImageList; const Icon : TIcon): Integer;
var
TempStream : TMemoryStream;
NewItem : TsImgListItem;
begin
TempStream := TMemoryStream.Create;
Result := -1;
try
Icon.SaveToStream(TempStream);
NewItem := TsImgListItem.Create(ImageList.Items);
NewItem.ImgData.SetSize(TempStream.Size);
CopyMemory(NewItem.ImgData.Memory,TempStream.Memory,TempStream.Size);
Result := ImageList.AddIcon(Icon);
finally
TempStream.Free;
end;
end;HiIn the sConst.pas unit declared the MouseForbidden : boolean = False variable.
Try to set this variable to True.Great! It works!
CODEuses
sConst,…MouseForbidden := False/True;
Changing the MouseForbidden while the app is running is no problem.
Thanks for the help!
THX!
This solved the problem! <img src="style_emoticons//rolleyes.gif” style=”vertical-align:middle” emoid=”:roll:” border=”0″ alt=”rolleyes.gif” />
Big Thanks!
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)