PDA

View Full Version : context menu with scrolling



emrejen
12 Dec 2007, 8:40 AM
Hello,
This could have been answered before, but I did not find the answer so here is my post
I have a gird, with context menu. The grid is generated inside a BorderLayout, like so:
grid = new Ext.grid.TableGrid("regionsTable");
var layout = Ext.BorderLayout.create({
center: {
margins:{left:0,top:3,right:0,bottom:3},
panels: [new Ext.GridPanel(grid)]
}
}, 'grid-pane-outer');

But when I try to open the contex menu on a column, at the right end of the grid/layout, the menu opens and the layout gets a width scrolling, or if I am at the bottom, then opens up with more height scroll - this compels the user to scroll up/down to the item that they want to perform.
I wanted to know, if there is a way that the menu would realize the dimensions and will open to the left, or up wards in a way that there will be no additional scrolling?

something like the constrain view point that YUI has?
this is refereeing the Ext ver 1.

Thanks