PDA

View Full Version : html anchoring inside a panel ExtJS



funboard
3 Mar 2010, 9:20 AM
Hi,
is it possible to make an anchoring inside a panel like the html anchoring ?

i have a very long panel with a big vertical scrollbar, and i want to go directly (by clicking on a button) in the bottom of my panel.
I don't know if it's possible with ExtJs to do a classic anchoring.

thanks for your help.

zhegwood
3 Mar 2010, 10:36 AM
If you use a button, it would probably be easiest to use the scrollIntoView function.



//add this to the end of your items list
var anchor = new Ext.Component({
autoEl: {
tag: "a",
name: "bottom"
}
});

//anchor button
var button = new Ext.Button({
text: "bottom",
handlers: {
click: function(btn,e) {
anchor.scrollIntoView(container-to-scroll);
},
scope: this
}
});