23 Apr 2012 6:06 AM #1
button underneath list component
i have a 'Ext.dataview.List' that i populate with data from a store. i also would like to add buttons underneath the list for the purpose of a next/previous page navigation. now when i add the buttons to the items config of the list, they appear on top of the list. However, i would like them to be below the list. i do not want them to be docked though, but scrolling with the content. O know i could wrapp the list in another panel and add the button below the list item. but when i can add one above the list without using another panel there should be a way to add one below it. somehow i am not able to find the answer. would anyone be so kind and point me in the right direction?
25 Apr 2012 5:16 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
For simplicity you could wrap the list in a container, allow the container to scroll and the list not to scroll. Add the buttons after the list in the items config of the container.
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
26 Apr 2012 1:31 AM #3
thanks a lot mitchell for you reply. yes i was also thinking along those lines. however, i thought that adding a container to add a button seems not the most straightforward solution. what i did and what worked for me now was that i bound a listener to the initialize event of the listview and than add the button after the event fires. this way the button also appears below the list. i am not sure what the more optimal solution is, but i would be glad to hear.