Is it possible to style a Button when i wrap it? It seems like setClass doesn’t work as it gets ignored if the Button is wrapped.
btnDownload.setClassName("btnBody");
fdwUpper.wrapComponent(btnDownload);
btnDownload2.setClassName("btnBody");
//fdwLower.wrapComponent(btnDownload2);
if i’m not wrapping my second button it gets styled correctly.
as soon as i wrap it, the style gets lost.
I’m not sure what is causing this. If you have an idea, let me know.
I have no idea, if i print the class name after wrapping the button i still get the class name :/
btnDownload2.setClassName("btnBody");
fdwLower.wrapComponent(btnDownload2);
System.out.println(btnDownload2.getClassName());
>>> btnBody
any idea how to track the issue down?
Maybe it’s because the button is a child component of the anchor inside the wrapper? Do i need to fix my .css?
.btnBody {
font-family: ibm plex sans semibold;
background: #00a9ce;
color: #fff;
width: 150px;
margin-top: 1%;
margin-bottom: 1%;
align-self: center;
}
Some more info.
If i create an Anchor and add my styled button to that anchor the button keeps it style, kinda strange as .wrapComponent(component) doesn’t do anything else than Anchor.add(component)