最近,我需要将Ext.Net TextField元素转换为Ext.Net TextArea元素。问题是元素所在的容器有一个设定的高度,并且TextArea超出了容器的边界。我已经尝试对元素应用了几个属性,但似乎都不起作用。在应用任何影响高度(Height、MaxHeight、BoxMaxHeight等)的属性时,似乎有一个bug会导致TextArea“折叠”到大约3px。我的猜测是,当将TextArea嵌套在一组特定的元素中时,这是一个问题。
标记(为简洁起见进行了修改)
...
<ext:Viewport ID="viewport" runat="server" MonitorResize="true" Layout="Fit">
<Content>
<ext:BorderLayout ID="BorderLayout1" runat="server">
<North Split="false">
<ext:Panel ID="Panel3" runat="server" Height="50" Layout="Fit" MonitorResize="true" Border="false">
<Items>
<ext:HBoxLayout ID="HBoxLayout2" runat="server" Pack="Center" OnLoad="ExtraControlsPanel_Load">
<BoxItems>
<ext:BoxItem>
<ext:TextArea ID="extraTextField" runat="server" FieldLabel="Variable" Visible="false" ForceSelection="true" Editable="false" IDMode="Static" Width="250" LabelWidth="50" LabelPad="15" LabelAlign="Right">
</ext:TextArea>
</ext:BoxItem>
</BoxItems>
</ext:HBoxLayout>
</Items>
</ext:Panel>
</North>
</ext:BorderLayout>
</Content>
</ext:Viewport>
...正如我所提到的:如果将“TextArea”属性应用于高度(不管值是什么),则元素在呈现时会“折叠”到大约3px。有没有人在任何重要的职位上使用过Ext.Net,这方面可能有一些见解?提前谢谢你。
发布于 2019-01-09 16:55:17
在ext.net v4上更新,将Grow="true" Height="99"与ext:TextArea配合使用
示例
<ext:TextArea ID="txtUrl" Grow="true" Height="50" runat="server" FieldLabel="labelname" LabelWidth="87" Width="620" MaxLength="100" EnforceMaxLength="true" />https://stackoverflow.com/questions/9980278
复制相似问题