Reputation: 5192
I am facing an issue with TOP align of checkbox and any label image. I have set it's method setVerticalAlignment = TOP. but it's not working.
For Checkbox below code i have been used.
CheckBox c = new CheckBox();
c.setName(jobSequence);
if(row%2==0){
c.setUIID("oddCheck");
}
else{
c.setUIID("evenCheck");
}
c.setVerticalAlignment(TOP);
For status image icon below code i have been used.
Label statusLabel = new Label(res.getImage(imageName));
statusLabel.setUIID("login_title");
statusLabel.setVerticalAlignment(Label.TOP);
Any idea how to solve this ?
You can see issue in below image.
Upvotes: 1
Views: 68
Reputation: 7483
Instead of:
CheckBox c = new CheckBox();
c.setName(jobSequence);
if(row % 2 == 0){
c.setUIID("oddCheck");
} else {
c.setUIID("evenCheck");
}
myContainer.addComponent(c);
Do this:
CheckBox c = new CheckBox();
c.setName(jobSequence);
if(row % 2 == 0){
c.setUIID("oddCheck");
} else {
c.setUIID("evenCheck");
}
myContainer.addComponent(FlowLayout.encloseIn(c));
Upvotes: 2