I am trying to right align a button.
So far I have this:
#include <iup.h>
#include <stdlib.h>
int close(Ihandle *self) {
return IUP_CLOSE;
}
int main(int argc, char **argv) {
Ihandle *button, *quit, *dlg;
IupOpen(&argc, &argv);
button = IupButton(NULL, NULL);
IupSetAttribute(button, "IMAGE", "extras/view.bmp");
IupSetAttribute(button, "IMAGEPOSITION", "LEFT");
quit = IupButton(NULL, NULL);
IupSetAttribute(quit, "IMAGE", "extras/close.bmp");
IupSetAttribute(quit, "IMAGEPOSITION", "RIGHT");
IupSetCallback(quit, "ACTION", (Icallback)close);
dlg = IupDialog(IupVbox(button, quit, NULL));
IupShow(dlg);
IupMainLoop();
IupClose();
return EXIT_SUCCESS;
}
But the button does not align to the right.
I have tried the following:
IupSetAttribute(quit, "IMAGEPOSITION", "RIGHT");
and IupSetAttribute(quit, "ALIGNMENT", "ARIGHT");
but the button does not go to the right.
I could set SCREENPOSITON
, but I am worried that might not work if run on different size sceens. How do I align my button to the right?
Here is a picture of what I have currantly with where I am aming for the button to end up: