55143681 Posted March 18, 2021 Share Posted March 18, 2021 cb10.3.3+unigui1546. Dear: I use the follow code to create some UnimRadios and UnimCheckBoxs, UnimCheckBox can be set checked,but UnimRadio can not be set checked,why? TUnimRadio *newRadio=new TUnimRadio(this); newRadio->Checked=true;//No effect TUnimCheckBox *newCheck=new TUnimCheckBox(this); newCheck->Checked=true;//Works well Link to comment Share on other sites More sharing options...
Sherzod Posted March 18, 2021 Share Posted March 18, 2021 Hello, Link to comment Share on other sites More sharing options...
55143681 Posted March 18, 2021 Author Share Posted March 18, 2021 25 minutes ago, Sherzod said: Hello, Thanks alot.sherzod TUnimRadio *newRadio=new TUnimRadio(this); newRadio->Name="newRadio"+String(choId); newRadio->Parent=UnimPanel2; newRadio->Top=10+50*(choNo-1); newRadio->Left=10; newRadio->FieldLabelFont->Size=15; newRadio->FieldLabelFont->Color=clBlack; newRadio->FieldLabelAlign=laRight; newRadio->FieldLabel="["+choId+"]"+choText; //如果是重返题目则根据原始答案进行勾选 if(tmpText[subNo].Pos(choId)>0) { myRadio->Checked=true; newRadio->JSInterface->JSAddListener("painted", "function(){this.setChecked(true)}");//解决选中不显示的BUG } Link to comment Share on other sites More sharing options...
Sherzod Posted March 18, 2021 Share Posted March 18, 2021 So, does it work for you? Link to comment Share on other sites More sharing options...
55143681 Posted March 18, 2021 Author Share Posted March 18, 2021 1 minute ago, Sherzod said: So, does it work for you? Yes,maybe it is a little bug! Link to comment Share on other sites More sharing options...
Recommended Posts