bar->AddButton("Close","delete bar","Close Controlbar");
should do the trick.
gROOT->Reset() only will remove "stack" based objects, not objects
created on the heap, like:
  TControlbar *bar = new TControlBar(...)
Cheers, Fons.
> 
> 
> Hi, 
> 
> I include the folllowing lines in the macro:
> 
> {
>  ...
>  bar->AddButton("Close","gROOT->Reset()","Close Controlbar");
>  ...
> }
> 
> but can not close the Controlbar menu after click it with mouse !!??
> 
> Best Regard
> 
> Xie
> 
>             *__________________________________________*
>              ******************************************
>              *  Mail:				      *	
>      	     *	 Department of Particle Physics       *
>     	     *	 Weizmann Institute of Science        * 
>      	     *	 Rehovot 76100 ISRAEL                 * 
>       W__W   *   ----------------------------------   *   W__W
>     /     \  *  PHONE : 972 8 9343372 (o) 9471872 (h) *  /     \
>    (  0 _ 0) *  FAX   : 972 8 9344106                 * (0 _ 0  )
>     \_  V_/  *  E-mail: xiewei@ceres.weizmann.ac.il   *  \_^  _/
>     /     \  *                                        *  /     \
> =OOOo=======oOOO====================================OOOo=======oOOO======
> 
> 
-- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland Phone: +41 22 7679248 E-Mail: Fons.Rademakers@cern.ch Fax: +41 22 7677910