PDA

View Full Version : problem with rendering button



tubamanu
27 Aug 2009, 4:31 AM
salut,

i'm rendering a button to each row in a grid. this works fine and the button functionality is also working correct.
my problem is, that the button is always in the foreground of the grid. ( see screen )....is it possible to remove the borders around the button?



createButtons:function (id) {
var btn_edit = new Ext.Button( {
renderTo: 'user_edit' + id,
id: id,
icon: '/images/icons/pencil.png',
tooltip: '<?php echo __('Edit user',null,'usermanagement'); ?>',
handler: cf.UserGrid.handleEdit
});
}
15937

cheers and thx 4 help!

Jack9
27 Aug 2009, 9:36 AM
style:{
border:'none'
}

or assign a cls: 'myBorderlessClass' and define that in an included CSS. There are lots of tutorials about CSS styling of buttons on the web.

Remember, you are not limited to Ext's component looks. You have access to native javascript, html, and CSS. This is often lost on newbies. If you start to have trouble, reach in your bag of available tools beyond Ext (usually CSS).

tubamanu
27 Aug 2009, 10:31 AM
thx 4 your reply....
but it doesnt work....

in another project i got the button look correct. i copied most of the source code from exisitn gproject into this...but the result is not the same....
my code is now this



createButtons:function (id) {
var btn_edit = new Ext.Button( {
renderTo: 'user_edit' + id,
id: id,
icon: '/images/icons/pencil.png',
style:{border:'none'},
tooltip: '<?php echo __('Edit user',null,'usermanagement'); ?>',
handler: cf.UserGrid.handleEdit,
scope : this
});
}