www.pudn.com > ChaoJiQiDong.rar > u_OutlookBar.pas, change:2009-11-21,size:1103b


unit u_OutlookBar; 
 
interface 
uses 
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, mxOutlookBarPro ; 
 
 
  Function   AddNewHeader(mxOutlookBarPro:TmxOutlookBarPro;headerText:string):TmxHeader; 
  Function   AddNewButton(mxHeader:TmxHeader;ButtonText:string):TmxButton; 
implementation 
 
 
Function   AddNewHeader(mxOutlookBarPro:TmxOutlookBarPro;headerText:string):TmxHeader; 
var 
  mxHeader:TmxHeader; 
begin 
   mxHeader:=NIL; 
   mxHeader:=mxOutlookBarPro.Headers.Add; 
   mxHeader.Caption :=headerText; 
   mxHeader.Background.Color := clWhite; 
   mxHeader.FirstButtonTop:=1; 
   mxHeader.Settings.ButtonStyle:=bsLarge; 
   Result:=mxHeader; 
end; 
 
Function   AddNewButton(mxHeader:TmxHeader;ButtonText:string):TmxButton; 
var 
  mxButton:TmxButton; 
begin 
   mxButton:=NIL; 
   if  mxHeader=NIL then exit; 
   mxButton:=mxHeader.AddButton; 
   mxButton.Caption :=ButtonText; 
   mxButton.Cursor:=crHandPoint; 
   mxButton.ButtonStyle:=bsLarge; 
   mxButton.AutoSize :=True; 
   mxButton.Alignment:=taCenter; 
   Result:=mxButton; 
end; 
 
end.