For some design reassons i need to make button with 2 lines of text, both of which should be centered and looks like usual button.
For first i simple tried "\n" for the button.gadget's GA_Text : it simple didnt' work, and \n treatet as fancy character.
Then, Javier point me out that we may try this way : create label.image object with LABLE_Text (this one handle \n fine), and then, attach it to a button:
twolinesimage = IIntuition->NewObject(NULL, "label.image",
LABEL_Text, "Replace All\nin All Tabs",
LABEL_Justification, LJ_CENTER,
TAG_END);
...
LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget",
GA_Image, twolinesimage,
TAG_DONE),
...
While it more or less work, it have 2 issues :
1). LABEL_Justification, LJ_CENTER, for the Label object with \n seems do not work. So text looks not centered.
2). When we press on this "button", it acts not like usual button visually, but bring some background.
So question is : how to make a 2 lines button , which looks like button, and press like button (even if it will be not real button), and have centered text in.
Thanks!