cbuttonborderlessiupgui-toolkit

Remove border completely from Iup_FlatButton


I am trying to remove the border from a IupFlatButton so that it just looks like text (until pressed). The window so far here:

As you can see it still has a small dotted border.

My script:

#include <iup.h>

#include <stdlib.h>

int main(int argc, char **argv) {

    IupOpen(&argc, &argv);

    Ihandle *dlg, *btn, *vbox;

    btn = IupFlatButton("Borderless");

    vbox = IupVbox(btn, NULL);

    dlg = IupDialog(vbox);

    IupSetAttribute(dlg, "TITLE", "Borderless Window");

    IupSetAttribute(btn, "SHOWBORDER", "NO");

    IupShowXY(dlg, IUP_LEFT, IUP_LEFT);

    IupMainLoop();
    IupClose();
    return EXIT_SUCCESS;
}

I have looked at the documentation

So far I have tried the following:

I still cannot get rid of the border around it though.

How can I do that?


Solution

  • The small dotted border is the focus feedback. If you have more controls on your dialog and click in another one, this line will be displayed only on the focus control.

    If you don't want the control to receive the keyboard focus for Tab navigation, then simple set CANFOCUS=NO.