Ticket Q463586
Visible to All Users

Add the capability to provide image lists for individual tile items

created 11 years ago

[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?

Comments (2)
DevExpress Support Team 11 years ago

    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…

      Answers approved by DevExpress Support

      created 11 years ago (modified 11 years ago)

      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.

      Additional information:

      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.

        Show previous comments (12)
        DevExpress Support Team 11 years ago

          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:

          Delphi
          Texture.SetBitmap(TextureBitMap); BorderColor:= clGradientStart; // GradientBeginColor:= DefBGColour; use designtime colour! GradientEndColor:= clGradientEnd;

          with:

          Delphi
          ParentStyle := True;

          Or, if you didn't customize any Style property settings in your frames, you can totally remove the following code snippet:

          Delphi
          Fct:= 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;

            DevExpress Support Team 11 years ago

              Yes, this should work just fine.

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.