- This topic has 2 replies, 2 voices, and was last updated 6 years, 1 month ago by HeDiBo.
-
AuthorPosts
-
September 28, 2018 at 3:19 pm #37961HeDiBoParticipant
The problem is very difficult to reproduce in a test project.
I have a TsListView showing the skincontroller's images for skins.
Whenever I change skin, the images are all blanked
This is the panel with the images (the skin Sport is about to be selected):
[attachment=8915:TsListView Before.jpg]
This is the panel after Sport has been selected:
[attachment=8916:TsListView After.jpg]
Also if I select another skin from the program icon in stead, the same thing happens.
This is the little code that shows the images:
Code:procedure TfrSettings.RedrawSkins;
var
i: Integer;
li: TListItem;
begin
with dmWIP4 do begin
lvSkins.Clear;
lvSkins.Visible := sSkinManager.Active;
gbSamples.Visible := lvSkins.Visible;
if lvSkins.Visible then begin
lvSkins.SortType := stText; // Show in skin name sequence
lvSkins.LargeImages := SkinImages;
for i := 0 to SkinNames.Count-1 do begin
li := lvSkins.Items.Add;
li.Caption := SkinNames;
li.ImageIndex := i;
if sSkinManager.SkinName = li.Caption then lvSkins.Selected := li;
end{for};
end{if};
end{with};
lvSkins.Refresh;
end;This is the dfm part for the list view:
Code:object lvSkins: TsListView
AlignWithMargins = True
Left = 1
Top = 47
Width = 687
Height = 389
Margins.Left = 0
Margins.Top = 5
Margins.Right = 0
Margins.Bottom = 0
DoubleBuffered = True
SkinData.SkinSection = 'PANEL'
HighlightHeaders = False
Align = alClient
AllocBy = 4
Columns = <>
ColumnClick = False
HideSelection = False
HotTrack = True
HotTrackStyles = [htHandPoint]
HoverTime = 10000000
IconOptions.AutoArrange = True
IconOptions.WrapText = False
ShowColumnHeaders = False
TabOrder = 1
OnSelectItem = lvSkinsSelectItem
endApologies for the incorrect indentations, it's my browser, I think.
The SkinImages and SkinNames were loaded once upon the program start.
September 29, 2018 at 6:11 pm #58435SupportKeymasterI see defining of the LargeImages to SkinImage:
Code:lvSkins.LargeImages := SkinImages;How the SkinImages ImageList is filled? It looks like SkinImage is empty when images are not visible.
September 30, 2018 at 9:39 am #58438HeDiBoParticipant'Support' wrote:I see defining of the LargeImages to SkinImage:
Code:lvSkins.LargeImages := SkinImages;How the SkinImages ImageList is filled? It looks like SkinImage is empty when images are not visible.
Thank you
Your answer made me rethink the logic. And sure enough, I made a silly mistake.
-
AuthorPosts
- You must be logged in to reply to this topic.