Discussion Forums  >  Self Hosted Control Panels

Replies: 3    Views: 928

xtremeesolutions
Code is Art
Profile
Posts: 106
Reg: Nov 19, 2011
FootHill Ranch,...
6,610
12/22/12 04:23 AM (13 years ago)

Want to change button Size in Xcode

Hi Team, I used a Menu Button in an Application and I have given Vertical Left in Button layout. I have some images for buttons in rectangular size. when i look this app in Simulator it show small buttons in left with half part of image. How can I make my buttons full rectangle so Button will show with full images. Any help will be appreciated. Thanks Rakesh
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
12/22/12 07:42 AM (13 years ago)
Are you using transparent PNGs? Set the button background to clear, make sure the button size is set to a decent size and try again? I assume you can see the button size and options settings, yes?
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
12/22/12 08:24 AM (13 years ago)
All the buttons need to be square, but they can have a transparent background so they appear to be rectangular or round or triangular,... (as @MacApple mentions). Once you've got your .pngs files ready play about with size and position in your control panel Hope this helps. Farcat
 
xtremeesolutions
Code is Art
Profile
Posts: 106
Reg: Nov 19, 2011
FootHill Ranch,...
6,610
like
12/23/12 11:27 PM (13 years ago)
I am not using transparent image, I have just rectangular size .jpg images. I have done this job in eclipse in layoutButtons() function of BT_screen_menuButtons.ava file for Android. like : buttonSize= deviceWidth-50; RelativeLayout buttonBox = getButton(tmpItem, cnt, buttonSize, 60 + addHeight, buttonPadding, addHeight); buttonBoxes.add(buttonBox); //add to layout... RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(buttonSize, buttonSize); if(buttonLayoutStyle.equalsIgnoreCase("verticalRight")){ lp.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); } buttonBox.setLayoutParams(lp); //add buttonBox to the table row... tr.addView(buttonBox, buttonSize + (buttonPadding * 2), 60 + buttonPadding + addHeight); But for I Phone, I have no idea that How I will do it. I tried some ways but not get success.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.