We want to limit the table header in the Record Browser to a height of one line only, otherwise it produces results that are not pretty. Therefore text wrapping for column names should not be used.
There is a method that displays column names (field label) in shortened version - for example for a field "Long Field Name" it will display "LFN". To do so the following method should be used:
$this->rb->set_header_properties(array('Long Field Name'=>array('name'=>__('LFN')))));
This method let's you setup a width of the column as well:
$this->rb->set_header_properties(array(
'project_name'=>array('width'=>'110px', 'wrapmode'=>'nowrap'),
'company_name'=>array('width'=>'110px'),
'estimator'=>array('width'=>'110px'),
'percent_complete'=>array('name'=>'PC', 'width'=>'30px'),
'exterior'=>array('name'=>__('Ext'), 'width'=>'28px'),
'tm'=>array('width'=>'28px'),
'status'=>array('width'=>'72px'),
'contract_amount'=>array('name'=>__('Contract'), 'width'=>'80px'),
As for tooltips in column names - yes this can be done also:
/* Define tooltip here*/
$tooltip = Utils_TooltipCommon::open_tag_attrs('<img src="'.Base_ThemeCommon::get_template_file('path_to_your_module_template', 'some_icon.png').'"/>', false, 400);
$your_tooltip_label = '<span '.$tooltip.'><img style="vertical-align: middle;" border="0" width="14" height="14" src="'.Base_ThemeCommon::get_template_file('path_to_your_module_template', 'icon.png').'"> '.__('Your Label').'</span>';
$this->rb->set_header_properties(array(
'your_column_name'=>array('name'=>$your_tooltip_label),
'person'=>array('width'=>'90px'),
'date'=>array('width'=>'120px')
));