Hello again. Discovered this today when I was trying to set help using the title bar.
If you set sTitleBar.Images at design time, the image looks correct. The outline is a little odd. I am using 16×16. If I were to go with a larger image the outline would be less prevalent.
Now, if you were to set sTitleBar.Images at run time, the image looks offset. The outline is still in the same place. However, the image is down and to the right.
procedure TForm12.FormCreate(Sender: TObject);
begin
tbMain.Images := vil16il48;
end;
Can this be corrected? I use the same virtual image list throughout the project and set it in the form create for other dialogs. This is a safe way because I do not have to worry about losing the link between 2 forms.
Update:
I have more information to share. Using the scenario where the image is offset and you press the image and it performs something like showing a message notification, opening the help file, etc., the image moves to its proper position.
I have a work around for this for now. Toggle AutoSize and the image is in its proper place at the beginning. There might be other properties to try.
procedure TForm12.FormCreate(Sender: TObject);
begin
tbMain.Images := vil16il48;
tbMain.Items[1].AutoSize := False;
tbMain.Items[1].AutoSize := True;
end;