PDA

View Full Version : Accordion collapseFirst does not work



mohit.chauhan
1 Feb 2013, 9:27 AM
i want to show arrow buttons on left in Accordion layout ... i have used collapseFirst: true but it does not work..... this is just a property that i never see working in any examples.

Is there any fix in Sencha update .... i have tried a lot for this but did not get success yet .....

Below is my code:


xtype: 'panel',
layout: {
type: 'accordion',
titleCollapse: true,
collapseFirst: true, //True to make sure the collapse/expand toggle button always renders first (to the left of) any other tools in the contained Panels' title bars, false to render it last
collapseTool: true,
fill: true,
multi: true
},
width: '100%',
items: [
{
xtype: 'panel',
title: 'Test'
............
.........



Thanks,
Mohit

friend
1 Feb 2013, 9:49 AM
collapseFirst has nothing to do with left alignment of controls. It only forces the collapse/expand toggle button to appear in front of other tool icons in a panel's title bar.

mohit.chauhan
1 Feb 2013, 12:27 PM
Thanks for reply but is this possible to render collapse/expand toggle button on left ..... before any controls and title?

i have tried using changing CSS, set Left position dynamically but did not work.
When Accordion renders it sets its left position by calculated width but i couldn't overwrite as its methods are not known. below HTML is showing toggle button and left position is set in element directly (not in CSS) (If you inspect element you will get what i mean).

<div id="tool-1060" class="x-tool x-box-item x-tool-default x-tool-pressed" role="button" style="margin: 0px; left: 289px; top: 7px;"><img id="tool-1060-toolEl" class="x-tool-collapse-top" role="presentation" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="></img></div>

is there any possibility to make toggle button in left of everything?

Thanks,
Mohit