javascript - Align a floating component to the top right of a container with ExtJS -


i have floating component (a panel), want align top-right corner of container.

for moment, i'm able align top-left corner component have listener :

        listeners: {             afterrender: function() {                 this.setposition(0,0)             },         } 

problem, container component should align width has undefined size has may resize according screen resolution.

how can manage ?

i've checked alignto method can't make work !

any idea ? same bottom-left corner !

i can provide more codes if needed.

thanks.

you can use alignto method follows;

listeners: {   afterrender: function(cmp, eopts) {      cmp.alignto(ext.getbody(), 'tl-tl');  } } 

that should it, bottom right alignment use 'br-br'. if want address screen resizing, put listener on viewport resize event , re-run alignto on component.


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -