Frederick Posted October 22, 2019 Share Posted October 22, 2019 The above controls do not seem to have a way for the caption to appear to the left of the circle or square graphic. Is there a way to do this per the attached image? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1511) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2019 Share Posted October 22, 2019 2 hours ago, Frederick said: The above controls do not seem to have a way for the caption to appear to the left of the circle or square graphic. Is there a way to do this per the attached image? Have you tried using FieldLabel instead of Caption? Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 22, 2019 Author Share Posted October 22, 2019 I tried the FieldLabel property and it seems to fit the requirement but why is it not visual in the IDE? In addition, there are no field label properties for the TUniRadioButton control. Is there a reason for this? I also see that there is no TUniDBRadioButton control. It would be great to have this as it makes for better placement of controls. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 23, 2019 Share Posted October 23, 2019 5 hours ago, Frederick said: I tried the FieldLabel property and it seems to fit the requirement but why is it not visual in the IDE? 13 hours ago, Frederick said: Is there a way to do this per the attached image? You can try to use this approach I think. For example for UniCheckBox, UniCheckBox.ClientEvents.ExtEvents - > function afterrender: function afterrender(sender, eOpts) { var me = sender; me.displayEl.setStyle('left', me.boxLabelEl.getWidth() - 10 + 'px'); //or me.getWidth()-10 + 'px'); me.boxLabelEl.setStyle('padding-left', '0px'); } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 23, 2019 Share Posted October 23, 2019 I think for others too. Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 23, 2019 Author Share Posted October 23, 2019 Thank you. I tried the above code for TUniCheckBox, TUniDBCheckBox and TUniRadioButton and they work nicely. However, in TUniDBRadioGroup, the program becomes unresponsive. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 23, 2019 Share Posted October 23, 2019 27 minutes ago, Frederick said: However, in TUniDBRadioGroup, the program becomes unresponsive. Can you please explain, what do you mean? Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 23, 2019 Author Share Posted October 23, 2019 I placed a TUniDBRadioGroup control on a form, added some items and then added the above AfterRender code. When I call the form's ShowModal, it refused to display and eventually became unresponsive. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 23, 2019 Share Posted October 23, 2019 Just now, Frederick said: I placed a TUniDBRadioGroup control on a form, added some items and then added the above AfterRender code. When I call the form's ShowModal, it refused to display and eventually became unresponsive. Can you please make a simple tescase for this? I will check. Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 23, 2019 Author Share Posted October 23, 2019 Sure, please find attached. radiogroup.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 23, 2019 Share Posted October 23, 2019 Ok thx, I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 23, 2019 Share Posted October 23, 2019 21 minutes ago, Frederick said: Sure, please find attached. radiogroup.zip function afterrender(sender, eOpts) { sender.getEl().query('.x-form-type-radio').forEach(function(cmp) { me = Ext.getCmp(cmp.id); me.displayEl.setStyle('left', me.boxLabelEl.getWidth() - 10 + 'px'); //or me.getWidth()-10 + 'px'); me.boxLabelEl.setStyle('padding-left', '0px'); }); } Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 23, 2019 Author Share Posted October 23, 2019 Thank you. The revised code works nicely. 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.