Results 1 to 2 of 2

Thread: How to offset the beginning of a new element

  1. #1
    Sencha User
    Join Date
    Aug 2013
    Vote Rating

    Default Unanswered: How to offset the beginning of a new element

    I have a LayoutContainer that by the time I try to a new element (combo box) there's already a button in the container so when I add my element it gets overlayed and hides the first element. I need to offset my element by about 100px in order to add it next the already existing button. Is there a way to do this? I tried to directly insert into the container using the index but my element still gets put on top of the existing button. Any ideas are appreciated.

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Vote Rating


    Can you share the code you have now? It is difficult to say exactly what will be the correct answer without knowing the basic structure of what you are doing.

    At a guess, you will probably need to measure the existing element and set the position of the new one (combo.el().setXY(...), etc). Or, you could apply float:left to both children. It might also be possible to just instruct the parent container you are using to re-run its layout once you add something new - any details you can offer will help to tell which direction will be best.

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