Results 1 to 4 of 4

Thread: spriteLegend padding only right and left?

  1. #1
    Sencha User
    Join Date
    Jun 2018
    Posts
    11

    Default spriteLegend padding only right and left?

    Hi,

    I know its possible to add a padding to a sprite legend. But it is (from my knowledge) only possible to add a general padding for all 4 sides.
    If i want to add a padding for all 4 sides as a string for example (padding: "0px 5px 0px 5px" or padding: "0 5 0 5") its not working (Maximum call stack size exceeded).

    How is it possible to only add a padding to left and right side of the items, but let top and bottom stay at 0? (cause i need the space at top and bottom)

    I tried to override the "Ext.chat.legend.SpriteLegend" but i don't really know how to start there.



    This is my current legend:
    legend: {
    type: 'sprite',
    docked: 'bottom',
    padding:10,
    },



    Edit:
    Example: https://fiddle.sencha.com/#view/editor&fiddle/2mtd

  2. #2
    Sencha User
    Join Date
    Jun 2018
    Posts
    11

    Default

    Bump...

  3. #3
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    What about fiddle sample?
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

  4. #4
    Sencha User
    Join Date
    Jun 2018
    Posts
    11

    Default

    Edited main-post aswell. Example: https://fiddle.sencha.com/#view/editor&fiddle/2mtd
    Also i just saw in another example of a fiddle and its working when its not "type: sprite" ..... https://fiddle.sencha.com/#fiddle/1bu2&view/editor here for example, if you add : padding: "0 20 0 20" in legend config or padding: "20 0 20 0" if you only want top and bottom padding

Similar Threads

  1. form padding-left problem ?
    By bsahin in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 9 Jan 2011, 11:36 PM
  2. left padding for combo box
    By naikgk in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 19 Oct 2010, 11:02 PM
  3. adding left padding to button
    By naikgk in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 19 Oct 2010, 12:53 AM
  4. ComboBox left padding
    By andreacfm in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 17 Sep 2009, 11:07 PM
  5. Replies: 2
    Last Post: 2 Sep 2008, 2:02 PM

Tags for this Thread

Posting Permissions

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