Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
52 user(s) are online (32 user(s) are browsing Forums)

Members: 0
Guests: 52

more...

Support us!

Headlines

 
  Register To Post  

boopsi: how to make button with 2 lines with centered text in ?
Home away from home
Home away from home


See User information
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_JustificationLJ_CENTER,
        
TAG_END);
...
        
LAYOUT_AddChildIIntuition->NewObject(NULL"button.gadget",
            
GA_Imagetwolinesimage,
            
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!

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project