Patch level : 10.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
Corretta gestione radio button e checkbox


git-svn-id: svn://10.65.10.50/trunk@16635 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-05-20 14:07:26 +00:00
parent a6f0eea254
commit 00e6b84182

View File

@ -2874,25 +2874,28 @@ xi_check( XI_OBJ * xi_obj, BOOLEAN check )
case XIBT_TABBTN: case XIBT_TABBTN:
{ {
XinWindow wins[MAX_RADIO_BUTTONS]; XinWindow wins[MAX_RADIO_BUTTONS];
XI_BTN_TYPE type; //XI_BTN_TYPE type;
XI_OBJ *parent; XI_OBJ *parent;
type = xi_obj->v.btn->type; //type = xi_obj->v.btn->type;
parent = xi_obj->parent; parent = xi_obj->parent;
if ( parent->type == XIT_CONTAINER && if ( parent->type == XIT_CONTAINER /* &&
( type == XIBT_RADIOBTN || type == XIBT_TABBTN ) ) ( type == XIBT_RADIOBTN || type == XIBT_TABBTN ) */)
{ {
int i; if (check)
{
int i;
if ( parent->nbr_children > MAX_RADIO_BUTTONS ) if ( parent->nbr_children > MAX_RADIO_BUTTONS )
XinError( 20089, XinSeverityFatal, 0L ); XinError( 20089, XinSeverityFatal, 0L );
for ( i = 0; i < parent->nbr_children; ++i ) for ( i = 0; i < parent->nbr_children; ++i )
wins[i] = parent->children[i]->v.btn->btnctl; wins[i] = parent->children[i]->v.btn->btnctl;
XinWindowCheckRadioButton( btn->btnctl, wins, XinWindowCheckRadioButton( btn->btnctl, wins,
parent->nbr_children ); parent->nbr_children );
return; }
//return;
} }
if ( type == XIBT_RADIOBTN || type == XIBT_TABBTN ) else
{ {
XinWindowCheckBox( btn->btnctl, check ); XinWindowCheckBox( btn->btnctl, check );
return; return;