Hi,
I am using SmartGWT 2.5.
I have an issue with alignment of the value of a StaticTextItem when placed in ToolStrip. I use following code:
I can see actually 2 issues in the result of this code:
1) the text is 'user' is not alligned with the StaticTextItem label 'Logged as' (see incorrectAlignment.jpeg)
2) the width on the StaticTextItem applies only to the 'label' part of it and makes longer text wrapped (see widthOnlyOnLabelField.jpeg) (I could live with this)
At least it seems that if there is no space character the 'value' part of StaticTextItem gets more space (see longUserNameWithoutSpaceCharacter.jpeg) though I still do not like the alignment.
I am using SmartGWT 2.5.
I have an issue with alignment of the value of a StaticTextItem when placed in ToolStrip. I use following code:
Code:
public class MainMenu extends ToolStrip { public MainMenu() { setWidth100(); setHeight("30px"); setMembersMargin(5); //push all members to the right addFill(); StaticTextItem loggedAsLabel = new StaticTextItem("loggedAs", "Logged as"); loggedAsLabel.setHeight("30px"); loggedAsLabel.setWidth("300px"); loggedAsLabel.setValue("some name"); //loggedAsLabel.setTextAlign(Alignment.LEFT); addFormItem(loggedAsLabel); ToolStripButton logoutButton = new ToolStripButton("Logout"); addButton(logoutButton); } }
1) the text is 'user' is not alligned with the StaticTextItem label 'Logged as' (see incorrectAlignment.jpeg)
2) the width on the StaticTextItem applies only to the 'label' part of it and makes longer text wrapped (see widthOnlyOnLabelField.jpeg) (I could live with this)
At least it seems that if there is no space character the 'value' part of StaticTextItem gets more space (see longUserNameWithoutSpaceCharacter.jpeg) though I still do not like the alignment.
Comment