Is it possible to add a specific style to a gwt element??
e.g. if I have a button
Button X= new Button("X");
now if i want the button to be italic
can i do something like that
X.addStyleName(“font-style:italic”);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The styleName is only valid for an style defined in your CSS file. Check the answer from hilal for more details about it.
If you only need to specify an specific value, you can do something like
keep in mind that then you’re hard coding these value, and any change in the style will require to recompile your code.