ICONVIEW in black and white mode

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • ICONVIEW in black and white mode

    Dear all

    I want to use the IconView window on a pure black and white display (so no greyscales available) but I don't see an immediate solution how to handle the selected item.
    Changing the background color of the selected icon will just make the icon completely black.
    Is there a possibility to invert the icon? Or just have a border frame around the selected icon?

    Thanks

    Zjeriet
  • Hello Zjeriet,

    Unfortunately there is currently no function to invert selected icons. I would recommend you to use icons which are built with a frame. See section "Proportional fonts, framed" in chapter "Fonts" in the emWin user manual.

    Please make sure not to use transparent (WM_CF_HASTRANS) ICONVIEW widgets on a 1bpp dipslay. I assume this causes your icons to be displayed completely black.

    Best regards,
    Adrian
  • Hello Adrian,

    What you suggest is to use the framed font when a certain icon is selected?

    What I've done for now is to manually create the inverted icon.
    This is also stored on the uC.
    When an icon is selected I replace the icon manually with the inverted icon.
    This works quite well but asks for extra space and extra overhead.

    Thanks for your answer

    Kind regards,

    Gerrit
  • Hello Gerrit,

    No. I am sorry. I wanted to point you to framed fonts in order to see what kind of icons I am referring to. Building your icons with an additional frame might enable you to leave out the inverted icons.

    If you prefer inverting the icons, you do not have to store additional icons. You may also try use the XOR drawing mode and draw a rectangle on top of the selected icon.

    Best regards,
    Adrian