ext:即使render = true,按钮也不显示

时间:2013-04-09 08:59:06

标签: button ext.net

所以我得到了一个非常简单的标记,其中包含工具栏中的按钮。

现在的问题是,即使按钮“正确”写入DOM,它也不会显示出来 有关详细信息,请参阅此屏幕截图:

screenshot

有人会介意解释为什么设置固定的高度/宽度/位置不会将按钮放在前面而且包含的标记元素都有width=0px;height=0px;吗?

以下是一个示例:

<body>
<ext:ResourceManager ID="RM" runat="server" />
<ext:Viewport Layout="BorderLayout" runat="server" ID="InnerView" OverflowY="Scroll">
    <Content>
        <ext:Button ID="adminswap" runat="server" Text="Admin-Ansicht umschalten" Hidden="false"
            AllowDepress="true" MinHeight="16" ToFrontOnShow="true" Visible="true" Icon="ArrowSwitchBluegreen">
            <%-- This Guy doesn't show up--%>
        </ext:Button>
        <ext:Panel runat="server" ID="order" Border="false" OverflowY="Scroll">
            <LayoutConfig> 
                <ext:TableLayoutConfig Columns="3" />
            </LayoutConfig>
            <Items>
                <ext:Panel runat="server" Layout="ColumnLayout" RowSpan="2" Border="false">
                    <Content>
                       <p> And here is some Grid-panel, which is of no further interest</p>
                    </Content>
                </ext:Panel>
                <ext:Panel ColSpan="2" runat="server" ID="Panel_Instructions" Title="Türöffnung per Telefon"
                    Width="740" Padding="10" Border="true" AutoHeight="true">
                    <Content>
                        <br />
                        <p>
                            Some Multiline text containing instructions<br>
                            this also is of no further interest and just for the sake of the sample<br><br> lorem Ipsum dolor sit amet and stuff...
                        </p>
                    </Content>
                </ext:Panel>
                <ext:Panel runat="server" Width="350" AutoHeight="false" Height="200"
                    StripeRows="true" TrackMouseOver="true" Border="true">
                    <Content>
                       <p>Some Content Grid-Panel</p>
                    </Content>
                </ext:Panel>
                <ext:Panel runat="server" ID="Standort_Details" Title="Adresse" Width="370" Padding="10"
                    AutoHeight="false" Height="200" Border="true">
                    <Items>
                        <ext:DisplayField ID="Details_field1" runat="server" FieldLabel="street"
                            Name="" />
                        <ext:DisplayField ID="Details_field2" runat="server" FieldLabel="postal code" Name="" />
                        <ext:DisplayField ID="Details_field3" runat="server" FieldLabel="city" Name="" />
                        <ext:DisplayField ID="Details_field4" runat="server" FieldLabel="phone" Name="" />
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel_5" Border="true" Height="460" StyleSpec="vertical-align:top;" ColSpan="3" runat="server">
                    <Content>
                        <p> some content control grid-panel</p>
                    </Content>
                </ext:Panel>
            </Items>
        </ext:Panel>
      </Content>
  </ext:Viewport>
</body>

1 个答案:

答案 0 :(得分:2)

BorderLayout适用于地区。您没有指定任何区域。要使Button可见,您只需删除Viewport的Layout =“BorderLayout”。

这是an example of using a BorderLayout