Thank You JohannesL,
But what if i want to make my application responsive? I wanna show caption as well as Icon when application opened on laptop or desktop device with small icons… but when same app is opened in Tablet it will show big icon without caption. Is that possible?
split = new Button("Departments");
split.setIcon(VaadinIcons.AIRPLANE);
split.setStyleName(ValoTheme.BUTTON_BORDERLESS);
see what i get from this (Please find attachment)
it must display Airplane ICON i guess…
“if I use following code
split = new Button(“Departments”);
split.setIcon(VaadinIcons.AIRPLANE);
split.setStyleName(ValoTheme.BUTTON_BORDERLESS);
see what i get from this (Please find attachment)”
I don’t know what result you expect but be careful with using “component.setStyleName(…)”, because it overrides your other styles set on your component as described in the javadoc (
"Sets one or more user-defined style names of the component, replacing any previous user-defined styles." ) .
Is there a specific reason why you don’t want to use the build in icons (FontAwesome). You only need to import different font icons when you are not satisfied with the default ones.
/* Anything bigger */
.responsive[width-range~=“601px-”]
{
color: green;
font-size: 36px;
}
[/code]Please check the vaadin wiki / project links and search the forums for more info about responsive layouts/icons/components or post a more detailed question.
“Since it seems that you don’t even glance through the links i posted, i wrote a quick example for creating a responsive Icon.”
I already went through the links you posted earlier but I couldent construct the proper solution. I actually wanted to set icons to button using Hex codes as jouni did in his workshop. (Please find attachment below… see the scss theme in eclipse… “\e004” etc are used to generate icons )
Hello All,
now its working. Actually i have added icon in design also. Thats why it was not working . I have removed the icon from design and apply the above mentioned solution and its working. Sorry for the above post.
Thanks
Anjali Jain