<Widget>_SetBkColor with GUI_TRANSPARENT

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

  • <Widget>_SetBkColor with GUI_TRANSPARENT

    Hello All.

    I have a question with the color: GUI_TRANSPARENT.
    Is it possible to set a <Widget>_SetBkColor to the color GUI_TRANSPARENT ?

    Here is my code:

    WINDOW_SetBkColor(pMsg->hWin, GUI_YELLOW);
    LISTBOX_SetBkColor(hItem,LISTBOX_CI_UNSEL,GUI_TRANSPARENT);
    LISTBOX_SetBkColor(hItem,LISTBOX_CI_SEL,GUI_TRANSPARENT);
    LISTBOX_SetBkColor(hItem,LISTBOX_CI_SELFOCUS,GUI_TRANSPARENT);
    LISTBOX_SetBkColor(hItem,LISTBOX_CI_DISABLED,GUI_TRANSPARENT);

    So I believed that my listbox color will be Yellow, unfortunately, it is BLACK.
    So you will say, put all your properties to GUI_YELLOW for this widget, but is not so simple, in fact my background will be an image, that’s why I want my list box to be transparent to be in line with the background .
  • I found this subject in the forum :
    [SOLVED] How to make list box with transparent spacing & background color?


    It is similar to my use case, so I have changed a litlle bit the _OwnerDraw Cb.
    It works, but I have a black border around my listbox (file screen.png)
    I don't knwo why ?


    In attached, you will see my maintask.c


    Thansk.
    Images
    • screen.png

      11.78 kB, 480×272, viewed 495 times
    Files
    • mainTask.txt

      (819.85 kB, downloaded 340 times, last: )
  • [SOLVED] : <Widget>_SetBkColor with GUI_TRANSPARENT

    I found the solution.

    I need do set "no effect" for this widget !!

    Just add
    WIDGET_SetEffect(hItem,&WIDGET_Effect_None);
    during the init phase.

    And is working well ! :D :D