[DevExpress Support Team: CLONED FROM S170825: Add image list support to tile images]
In 13.2 (beta) the implementation of the tdxTileControl ImageList and ImageIndex is good so i've changed
my existing code to this method, instead of hardcoding it - thanks.
But, I also notice the tdxTileControlItem.Frames.Glyph.ImageIndex uses the same ImageList ,
which I feel would be better if each tile had its own separate "FrameImages" imagelist
as a Property?
Reason being that as i'm using a DLL the Images are all in the same resource, which gets confusing.
I am at present loading DLL images for tdxTileControl.Images and tdxTileControlItem.Style.Texture.
Maybe you could think about it as the code is already there right?
Add the capability to provide image lists for individual tile items
Answers approved by DevExpress Support
We have implemented the functionality described in this ticket. It will be included in our next update(s).
Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.
The Glyph.Images property has been introduced to tile items. Use this property to provide an image list for individual tile items and their frames. To reference images from this list, use the Glyph.ImageIndex property of a tile item or frame. A tile item's Glyph.Images property has priority over a tile control's Images property.
Hi Jeff,
I see your point. Since you are using the same Texture in your frames, you can simplify your code as follows. Just replace the following code snippet:
DelphiTexture.SetBitmap(TextureBitMap);
BorderColor:= clGradientStart; // GradientBeginColor:= DefBGColour; use designtime colour!
GradientEndColor:= clGradientEnd;
with:
DelphiParentStyle := True;
Or, if you didn't customize any Style property settings in your frames, you can totally remove the following code snippet:
DelphiFct:= Frames.Count-1; // ... of this Tile
if Fct> 0 then begin // set Background Texture to Tiles that have Frames...
for X:= 0 to Fct do with Frames[X].Style do begin
Texture.SetBitmap(TextureBitMap);
BorderColor:= clGradientStart; // GradientBeginColor:= DefBGColour; use designtime colour!
GradientEndColor:= clGradientEnd;
end;
end else begin // set default TILE IMAGES for Tiles (without Frames)...
because these frames were created with default Style settings, they use tile item Style settings in this instance (their ParentStyle property is set to True by default).
BTW, here's a link to the ParentStyle design-time issue: The ParentStyle property of a tile frame is reset to False if any of its Style property settings are customized. The functionality was broken for some time.
Merry Christmas and happy holidays!
Hi Alex,
Thanks, this works and perhaps saves some clock cycles! :)
But, as yo usay it has to be set at runtime (your update probably fixes that), like so…
Fct:= Frames.Count-1; // … of each Tile
if Fct> 0 then begin
for X:= 0 to Fct do Frames[X].ParentStyle := True;
end;
Thank you for sharing your idea with us. We will possibly implement this functionality with future versions of our controls.
For the purposes of clarification I have attached my sample screenshot…