Re: [ROOT] Changing TGbutton attributes

From: Tommaso Chiarusi (Tommaso.Chiarusi@bo.infn.it)
Date: Wed Nov 21 2001 - 13:50:18 MET


Hi Paolo, 
How are you?
 
since 
class TGButton : public TGFrame, public TGWidget

and since
TFrame has a function called  

void ChangeBackground(ULong_t back)   

that changes frame background
color, try this for change the color.


For the text, using TGTextButton, which inherits from TGButton, you can
use the function 


void SetText(const TString &new_label) 

to set new button text.

I hope this works, cheers
Tommaso

On Wed, 21 Nov 2001, Paolo Maestro wrote:

> Hi Rooters !
> I have a GUI application with some TGButtons.
> One of these   works
> like a   switch that  makes a child process  start or stop.
> I would like to know how  to change color and label of this TGButton,
> so that  when the process is running the button shows the label "Stop"
> and viceversa when the process is sleeping  the label is set to "Start".
> 
> Can you give me any helps or hints ?
> Thanks
> 
>                         Paolo
> 
> ********************************************
> * Paolo Maestro                            *
> * Istituto Nazionale di Fisica Nucleare    *
> * INFN - V.Vecchia Livornese,1291          *
> * 56010 S.Piero a Grado (Pisa) Italy       *
> * tel :   +39-050-880245/309               *
> * fax :   +39-050-880317                   *
> ********************************************
> 
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:09 MET