Results 1 to 3 of 3

Thread: How to apply html to Panel

  1. #1

    Default How to apply html to Panel

    This is actually somewhat related to: http://www.sencha.com/forum/showthre...-in-plain-HTML

    For the HTML config of the Panel, instead of specifying it inline, how can I grab a Table that is already defined in the underlying web page? This makes it much easier to use on larger, more complex layouts.

    Thanks.

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Take a look at the contentEl configuration.

    You can specify a string of an id within your underlying page. It will take the contents out of this div, and place it in the center of the Panel. You can also add a css class of "x-display-hidden" so that the content doesn't flash on the screen when it is first rendered and then moved.
    Aaron Conran
    @aconran

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    contentEl is one way to skin that cat.

    It moves the specified element into the body.

    If you need an element to be sized along with the Panel (if the Panel is resizable due to being part of a layout), then you can configure the Panel with

    Code:
            body: Ext.get('main-content').addClass('x-panel-body')
    or

    Code:
            layout: 'fit',
            items: {
                xtype: 'box',
                el: 'main-content'
            }

Similar Threads

  1. How can we apply the regular html style to the Ext form fields
    By kondurucs in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 26 Mar 2009, 9:21 AM
  2. How to apply a class to a Panel ?
    By prakash.raman in forum Ext 2.x: Help & Discussion
    Replies: 11
    Last Post: 3 Jun 2008, 10:19 PM
  3. how to apply a border layout to panel
    By dddu88 in forum Ext 2.x: Help & Discussion
    Replies: 11
    Last Post: 6 Nov 2007, 7:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •