[CLOSED] Panel Html

  1. #1

    [CLOSED] Panel Html

    I have a panel that holds a chart. When I don't display a chart I would like to display a HTML message. I can center the text horizontally, but am having trouble centering vertically.

    <ext:Panel ID="ChartPanel" runat="server" Region="Center" Layout="BorderLayout" 
           StyleSpec="text-align: center; display: table-cell; vertical-align: middle;">
    ...
    </ext:Panel>
       ...
       ChartPanel.Update("<p>Select a Request Year to display a chart.</p>");
       ...
    Last edited by Daniil; Nov 08, 2012 at 9:46 AM. Reason: [CLOSED]
  2. #2
    Hi Chris,

    Here is a good article about CSS aligning.
    http://phrogz.net/css/vertical-align/index.html

    Also do not forget to call a RemoveAll method for the ChartPanel, because an Update method doesn't clear items.

    Though, personally, I would use a CardLayout with a separate container for an Ext.NET Label or DisplayField. I would align it using a VBox and an HBox combination and switch the cards when needed.

    Here is a v1 example to center using VBox and HBox.
    http://forums.ext.net/showthread.php?13049

    The idea is the same in v2.

Similar Threads

  1. Replies: 1
    Last Post: Apr 11, 2012, 4:24 PM
  2. [CLOSED] Ext control in html tag of the panel.
    By stoque in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 12, 2011, 1:30 AM
  3. [CLOSED] [1.0] Panel .html
    By state in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 17, 2010, 6:00 PM
  4. TINYMCE HTML Editor in tab panel
    By CoolNoob in forum 1.x Help
    Replies: 0
    Last Post: Nov 13, 2009, 7:24 AM
  5. [CLOSED] Get html out of a ext:panel
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Nov 20, 2008, 3:08 AM

Posting Permissions