ICON_VIEW Text colour

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

    • ICON_VIEW Text colour

      Hello,

      I am using ICON_VIEW to set and arrange the buttons but I have a issue that I am unable to set separate text color for separate ICON.

      I have attached one sample file and similar to this I wanted to implement the GUI. The square icon should be in the middle of previous two icons(PFA).

      Could you please help me to implement this using ICON_VIEW?


      Thanks,
      Vikram
      Images
      • IconView.PNG

        3.79 kB, 381×261, viewed 720 times
    • Hi Vikram,

      unfortunately it is not possible to set different text colors for different icons, only for the two states "selected" and "unselected". Also, I doubt that it's possible with this widget to align the icons as your image suggests.

      I would suggest to use normal buttons instead of an iconview widget, since this is much more versatile. You can define the look of each individual button by setting a custom callback routine, where the drawing of the button is handled in the WM_PAINT case.

      I've attached an example demonstrating how to do this.

      Best regards,

      Florian
      Files
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.