Hi,
I have noticed some rendering problems of the DateItem and SelectItem widget. Across different browsers I get different renderings but none of them is really correct. I do not know what the showcase sample does so that the rendering there is correct, but if I try to use the sample code outside of the showcase environment I get the following renderings.
Internet Explorer 11:
Chrome 46:
Firefox 41:
As you can see in the images only the ComboBoxItem is rendered correct. So it seems to be possible. The SelectItemText of the DateItem and SelectItem have either an incorrect height or the text is at the bottom of the SelectItemText and is not centered as it should be. In Firefox we can see additionally that the form items in this case exceed the form group itself.
My sample code is:
What is wrong in my sample or what can I do in my sample to get the correct rendering as in the showcase? In my opinion a wrong calculation of the height of the SelectItem causes the various problems.
I use the LGPL SmartGWT 5.0p version from 2015-10-14.
Regards
I have noticed some rendering problems of the DateItem and SelectItem widget. Across different browsers I get different renderings but none of them is really correct. I do not know what the showcase sample does so that the rendering there is correct, but if I try to use the sample code outside of the showcase environment I get the following renderings.
Internet Explorer 11:
Chrome 46:
Firefox 41:
As you can see in the images only the ComboBoxItem is rendered correct. So it seems to be possible. The SelectItemText of the DateItem and SelectItem have either an incorrect height or the text is at the bottom of the SelectItemText and is not centered as it should be. In Firefox we can see additionally that the form items in this case exceed the form group itself.
My sample code is:
Code:
[B]package[/B] com.mycompany.client; [B]import[/B] java.util.LinkedHashMap; [B]import[/B] com.google.gwt.core.client.EntryPoint; [B]import[/B] com.smartgwt.client.widgets.form.DynamicForm; [B]import[/B] com.smartgwt.client.widgets.form.fields.ComboBoxItem; [B]import[/B] com.smartgwt.client.widgets.form.fields.DateItem; [B]import[/B] com.smartgwt.client.widgets.form.fields.SelectItem; [B]import[/B] com.smartgwt.client.widgets.layout.VLayout; [B]public[/B] [B]class[/B] HelloWorld [B]implements[/B] EntryPoint { @Override [B]public[/B] [B]void[/B] onModuleLoad() { DynamicForm form = [B]new[/B] DynamicForm(); form.setWidth(450); form.setColWidths(120, "*"); form.setIsGroup([B]true[/B]); form.setGroupTitle("Controls"); DateItem dateItem = [B]new[/B] DateItem(); dateItem.setTitle("Date"); dateItem.setHint("<nobr>Picklist based date input</nobr>"); LinkedHashMap<String, String> valueMap = [B]new[/B] LinkedHashMap<String, String>(); valueMap.put("US", "United States"); valueMap.put("CH", "China"); valueMap.put("JA", "Japan"); SelectItem selectItem = [B]new[/B] SelectItem(); selectItem.setTitle("Select"); selectItem.setHint("<nobr>A select item</nobr>"); selectItem.setValueMap(valueMap); selectItem.setDefaultValue("US"); ComboBoxItem comboBoxItem = [B]new[/B] ComboBoxItem(); comboBoxItem.setTitle("Combo Box"); comboBoxItem.setHint("<nobr>A combo box item</nobr>"); comboBoxItem.setValueMap(valueMap); comboBoxItem.setDefaultValue("US"); form.setItems(dateItem, selectItem, comboBoxItem); VLayout layout = [B]new[/B] VLayout(10); layout.addMember(form); layout.setMargin(30); layout.draw(); } }
I use the LGPL SmartGWT 5.0p version from 2015-10-14.
Regards
Comment