我有一个VLayout,占据屏幕宽度的100%。
它包含一些HTMLFlow元素,它们都是居中的。有一个Flow与屏幕具有相同的宽度,我想在2
中“分割”它e.g。从
"Time remaining: 01:01:01"
到
"Time remaining:
01:01:01"
所以,我尝试将流量宽度设置为50%,这完全控制了我的HTMLFlow长度,但随后对齐移动到左侧,
"Time remaining:
01:01:01"
然后我尝试将它包含在HLayout中,因此它保持居中但宽度得到覆盖并且不是50%宽度而是更少。
"Time
remaining:
01:01:01"
我是怎么做到的?
答案 0 :(得分:1)
您不能只将<br />
添加到HTML字符串中。无法在SmartGWT的HTMLFlow本身中控制换行。
来自HTMLFlow的JavaDoc:
Use the HTMLFlow component to display HTML content that should expand to its natural size without scrolling. [..] NOTE: Since the size of an HTMLFlow component is determined by its HTML contents, this component will draw at varying sizes if given content of varying size.