Main Menu Missing Icons (With solution)

Posted by: kbj on 26 December 2017, 11:39 am EST

    • Post Options:
    • Link

    Posted 26 December 2017, 11:39 am EST

    C1MainMenuItems with an image with the pixel in the bottom left corner set to black will set all black pixels in the image to transparent. Since the transparent color can be set in the C1CommandHolder, there should be no need for this “feature”.

    I create all my menu item images on the fly from svg files which allows for easy scaling and color changes. I added the below sub to slightly change the color of the pixel, and it appears to work.

    Private Sub kludgeFixPixel(ByRef bm As Bitmap)

    Dim pixelColor = bm.GetPixel(0, bm.Height - 1)

    Dim redValue = IIf(pixelColor.R = 0, 1, pixelColor.R - 1)

    Dim newPixelColor = Color.FromArgb(pixelColor.A, redValue, pixelColor.G, pixelColor.B)

    bm.SetPixel(0, bm.Height - 1, newPixelColor)

    End Sub

  • Posted 28 December 2017, 4:42 am EST

    Hello,

    Thanks for sharing your observations. ImageTransparentColor Property of C1CommandHolder can be set for images not in the image list.

    http://help.grapecity.com/componentone/NetHelp/c1command/webframe.html#C1.Win.C1Command.4~C1.Win.C1Command.C1CommandHolder~ImageTransparentColor.html

    Please refer the attached sample and see the items contained in C1MainMenu do have images set such that they have black pixels at the bottom left corner.

    Let us know if this is not what you mean, using a stripped down sample or a small video.

    Best Regards,

    Esha

    C1Command.zip

  • Posted 28 December 2017, 11:40 am EST

    Hi Esha,

    the second item under the first menu item is missing the square icon, which is what I was describing. Here is my test project that illustrates the same thing.

    The color of the pixel in the bottom left corner of the image becomes the transparent color, not just black. It could be any color (and I think the alpha is ignored)

    -KingmanmissingMenuIcons.zip

  • Posted 29 December 2017, 1:50 am EST

    Hi Kingman,

    The issue can be observed at our end as well and has been escalated (Internal Tracking ID:303312) to the concerned team.

    We will let you know once we hear from them.

    Best Regards,

    Esha

  • Posted 6 July 2018, 1:51 am EST

    Hi

    Kindly be informed, by using a new property “ImageTransparentColor”, icon is shown in main menu in the latest builds.

    You can either update to 2018-V2 builds using C1Live utility or get the builds from here :

    http://prerelease.componentone.com/dotnet40/c1winforms/2018-t2/C1WinForms.4_4.0.20182.314.zip

    Regards,

    Meenakshi

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels