【问题标题】:I have a problem with TabContainer control我对 TabContainer 控件有疑问
【发布时间】:2011-09-26 17:33:17
【问题描述】:

当我运行它时它没有出现在屏幕上..但它确实出现在 Visual Studio 2010 的设计视图中。我也想从左到右从右到左设置标签:

          <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="2" 
   Height="584px" Width="739px" AutoPostBack="True" BackColor="#666699" 
   BorderColor="#666699">
          <asp:TabPanel ID="Questions" runat="server" HeaderText="שאלות">

              <ContentTemplate>

                  <asp:GridView runat="server" Height="547px" 
                      style="margin-left: 2px; margin-top: 15px" Width="667px">
                  </asp:GridView>

                    </ContentTemplate>
              </asp:TabPanel>
                <asp:TabPanel ID="Answers" runat="server" HeaderText="תשובות">
              <ContentTemplate>
                  <asp:GridView ID="GridView1" runat="server" Height="547px" 
                      style="margin-top: 17px" Width="666px">
                  </asp:GridView>
                    </ContentTemplate>
              </asp:TabPanel>
                <asp:TabPanel ID="Responses" runat="server" HeaderText="תגובות">
              <ContentTemplate>
                  <asp:GridView ID="GridView2" runat="server" Height="547px" 
                      style="margin-top: 21px" Width="666px">
                  </asp:GridView>
                    </ContentTemplate>
              </asp:TabPanel>
   </asp:TabContainer>

【问题讨论】:

  • 你为什么要为header建立一个绝对位置?
  • 演示样式在标题中...它们是两个独立的部分。布赖恩..尝试移动它也许

标签: c# asp.net ajax controls


【解决方案1】:

对于从右到左的设置标签,在页面上添加以下样式:

.ajax__tab_header
{
     text-align: right;
}

但要解决可见性问题,信息不足。你在代码隐藏中使用可见性属性吗?

【讨论】:

    【解决方案2】:

    甚至更好:

    .ajax__tab_header
    {
         direction: rtl;
    }
    

    这也将切换选项卡的顺序。 (适用于 rtl 语言)

    【讨论】:

      猜你喜欢
      • 2020-12-30
      • 2017-02-22
      • 2019-05-06
      • 1970-01-01
      • 2020-10-17
      • 2021-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多