03-04-2013 12:56 AM - edited 03-04-2013 12:56 AM
I have made a custom button and now i have to add the text in the middle bt by default it starts from the left.code is
public CustomButton(String text,int background,int foreground)
so i want that the text in the butonfieldstarts from the center..
can anyone help me...??
Thanks in advance..
03-04-2013 04:06 AM
03-04-2013 04:35 AM
As suggested elsewhere, if you want a more accurate answer, then you will need to include more detail from your CustomButton - the code you have supplied is not helpful in determining what changes might resolve your problem.
03-04-2013 05:55 PM
You may need to override the layout method or perhaps just the paint method. Perhaps this link might help you find the solution that works for you.
The Vertical Button Set sample was useful to me when I was implementing a custom button.