RobYost Posted June 20, 2017 Share Posted June 20, 2017 source: https://unigui.miraheze.org/wiki/Main_Page I have created two new controls descended from TUnimEdit and TUnimLabel. added: Font size Font color Font style (Bold, Italics) border size border color I tried to accomplish this with code like this: s := ' document.getElementById("' + edt1.JSName + '_id").style.fontsize = "8px"; '; // Not works UniSession.AddJS(s); But "Delphi Developer" told me some CSS properties can not be changed and I would need to make the changes with CustomCSS This is more limited because I can't do things like: s := ' document.getElementById("' + edt1.JSName + '_id").style.fontsize = "'IntToStr(FFont.size) + 'px"; '; I have to add all combinations I will need to the CSS: .fontsize12 { font-size: 12px; } .fontsize14 { font-size: 14px; } I created a wiki with the two new components and the CustomCSS file. Please take a look and make any changes you can think of to make it better. I would rather do the styles in code instead of with CSS file, but I couldn't make it work. I am not done, but I thought it might be good for someone else to look at it in case there are some basic changes that could be made to make it better. 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted June 20, 2017 Share Posted June 20, 2017 Hello RobYost, It's wonderful ! Quote Link to comment Share on other sites More sharing options...
RobYost Posted June 20, 2017 Author Share Posted June 20, 2017 I forgot the link to the wiki https://unigui.miraheze.org/wiki/Main_Page I will edit the top post to add it. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 20, 2017 Share Posted June 20, 2017 Thank you! Quote Link to comment Share on other sites More sharing options...
herculanojs Posted January 14, 2018 Share Posted January 14, 2018 It is a big problem this issue in the unigui. New versions should already contain such properties by default. tanks for contribution 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.