GUI: how to disable a button group?

Hi rooters

Suppose i would like to disable the whole TGButtonGroup by additional button:

like
fBut->Connect(“Toggled(Bool_t)”,“ClassName”,this,“Slot1(Bool_t)”)
and then i need to use in Slot1 something like

if(isChecked){
fButGrp->GetButton(kBut1)->SetState(kButtonDisabled);
fButGrp->GetButton(kBut2)->SetState(kButtonDisabled);
fButGrp->GetButton(kBut3)->SetState(kButtonDisabled);
}

So the question: is there a way to do it with fButGrp as a whole, something like
fButGrp->Disable() ?

Hi Kirill,

This is not implemented but sounds resonable. I will include it in our ToDo list and will keep you informed.

Cheers, Ilka

Hi Kirill,

The requested feature is available in cvs head. You can disable a TGButtonGroup by using the method bgr->SetState(kFALSE); and to enable it again by bgr->SetState(kTRUE).To check the current state use the method IsEnabled().

Cheers, Ilka