1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    63
    Vote Rating
    0
    cdasher is on a distinguished road

      0  

    Default How do I add padding to various panels, widgets etc.

    How do I add padding to various panels, widgets etc.


    I have a FormPanel with a FlowLayout and when I add Fields to it, they are all backed up to the very edge (left side) of the panel, is there any way to add some padding or margins around the inside of the Form or a ContentPanel so that I have some space?

  2. #2
    Ext User
    Join Date
    Apr 2008
    Posts
    18
    Vote Rating
    0
    baluba is on a distinguished road

      0  

    Default


    The formpanel uses a AnchorLayout by default, not a flowpanel. Changing its layout will probably not work very well.

    If you need to add buffer between the FormPanel's boundary and its child widgets there is no way of doing I think, I also tried earlier.

    You can try the following as a workaround:

    - Create a wrapping Container and set FillLayout(someValue) to establish the buffer. Turn borders on for wrapper.
    - Create the FormPanel and disable the header, frame, and boundary and add it to the wrapper. Now it will look like the wrapper border is the form border.

    Problem with this approach is that your wrapper needs to be sized explicitly. If the wrapper is sized by its parent, your panel will follow.

  3. #3
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Try this:
    Code:
    panel.setStyleAttribute("padding", "20");
    This is what the FormPanel page in the explorer demo does.

  4. #4
    Ext User
    Join Date
    Apr 2008
    Posts
    63
    Vote Rating
    0
    cdasher is on a distinguished road

      0  

    Default


    Yes that worked the only problem is that the background for that is a light blue (it is inside a Window) and when I set the window background property to white it is still blue so I have the padding which is now a light blue. Also are the various style attributes documented so I can attempt to find my own answer before taking up your and others' time?

  5. #5
    Ext User
    Join Date
    Apr 2008
    Posts
    63
    Vote Rating
    0
    cdasher is on a distinguished road

      0  

    Default


    And once I fixed my button problem (a different post) I realized that the buttons are on the Form which is a light blue with the fields in a white box. So I guess I actually do not have an issue after all thanks.

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi