uniguibbs Posted December 24, 2013 Share Posted December 24, 2013 unigui 0.94 delphi xe2 Dynamic create TUniRadioGroup. following code, the columns doesn't divide to 6. what's wrong? RemoveControl(rgEmp2); rgEmp2 := TUniRadioGroup(InsertControl(TUniRadioGroup.Create(Self))); rgEmp2.ClientEvents.ExtEvents.Add( 'radioGroup.beforerender=function radioGroup.beforerender(sender, eOpts)' + #13#10 + '{' + #13#10 + 'sender.columns = 6' + #13#10 + '}' ); if not cdsDepMan.IsEmpty then begin cdsDepMan.First; while not cdsDepMan.Eof do begin rgEmp2.Items.Add(cdsDepManempname.AsString); cdsDepMan.Next; end; end; Quote Link to comment Share on other sites More sharing options...
uniguibbs Posted December 24, 2013 Author Share Posted December 24, 2013 ok. resolved by myself. give the new component a name. it works. Quote Link to comment Share on other sites More sharing options...
uniguibbs Posted December 24, 2013 Author Share Posted December 24, 2013 second question: give a name to the componet. next time run this code , exception raise --------------------------- Debugger Exception Notification --------------------------- Project FlowQinJia.exe raised exception class EComponentError with message 'A component named rgrmp2 already exists'. --------------------------- i try to RemoveControl(rgEmp2) at first; another exception raise " the component not exists." what's wrong? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.