[CLOSED] Panel padding change

  1. #1

    [CLOSED] Panel padding change

    Hi,

    Is it possible to change the padding of a Panel either on the client or in the code behind? I've tried both with no success. Is there more to this?

    <ext:Panel ID="Panel1" runat="server" HideMode="Offsets" Width="800" PaddingSummary="80px 0px 40px 80px">
    </ext:Panel>
    // Client side
    Panel1.padding="";
    // Server side
    Panel1.Padding="";
    Panel1.PaddingSummary="";
    Last edited by fabricio.murta; Jan 04, 2016 at 7:18 PM. Reason: [CLOSED]
  2. #2
    Hello,

    Here is a way to change it from client side:
    Panel1.body.setStyle('padding', "20px 0px 10px 20px");
    Panel1.body.setWidth(Panel1.width);
    Hope this helps!
    Last edited by fabricio.murta; Dec 30, 2015 at 9:13 PM.
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Thanks much for the pointers, Fabricio! What would be the call to reset the panel padding to its original no-margin defaults? I've tried the following but it would leave the right and bottom margins visible.

    Panel1.body.setStyle('padding', "");
    Panel1.body.setWidth(Panel1.width);
  4. #4
    Well, how does it sound:
    "Before changing the padding, save the previous value"?

    If sounds good, just var orgPadding = Panel1.body.getStyle('padding');

    And then use it as the setStyle() parameter when you want to restore it.
    Fabrício Murta
    Developer & Support Expert
  5. #5
    Thanks, Fabricio, Happy New Year to you and the entire Ext.Net crew!
    I've figured out the missing pieces in my setup, please mark this question as resolved.
  6. #6
    Glad you figured it out! Thank you and have an outstanding new year too!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 2
    Last Post: Sep 08, 2011, 4:39 PM
  2. Replies: 8
    Last Post: Apr 01, 2010, 6:25 PM
  3. Replies: 1
    Last Post: Jul 06, 2009, 1:33 PM
  4. Replies: 1
    Last Post: May 10, 2009, 2:15 PM
  5. [CLOSED] How to adjust padding around panel inside portlet?
    By iansriley in forum 1.x Premium Help
    Replies: 2
    Last Post: Mar 10, 2009, 3:30 PM

Tags for this Thread

Posting Permissions