I tried a lot and searched a lot. But couldn't find a way to add a button in a particular tab in the admin section. when examined the core files,I have found out that the following code is somehow using for adding button in a particular tab. Here is my second tab defining file
<?php
class Karaokeshop_Banner_Block_Adminhtml_Banner_Edit_Tab_Image extends
Mage_Adminhtml_Block_Widget_Form
{
protected function _prepareForm()
{
$form = new Varien_Data_Form();
$this->setForm($form);
$fieldset = $form->addFieldset('banner_image',
array('legend'=>Mage::helper('banner')->__('Banner Image')));
$this->setChild('add_banner_img',
$this->getLayout()->createBlock('adminhtml/widget_button')
->setData(array(
'label' => Mage::helper('banner')->__('Add Banner Image'),
'id' => 'add_banner_img',
'name' => 'add_banner_img',
'element_name' => 'add_banner_img',
'class' => 'add' ,
'onclick'=> 'bannerImage.addNewImage()'
))
);
return parent::_prepareLayout();
}
public function getBannerImgButtonHtml()
{
return $this->getChildHtml('add_banner_img');
}
}
But it does not add any button in my tab. How can I add a button in a particular tab? Note that i need to add this button along with the title of the tab .