jahlxx Posted April 11, 2018 Share Posted April 11, 2018 Hi. I'm trying some things with customcss. I do this and works as expected: .x-form-field { font: 12px tahoma !important;} I have tried with .x-form-checkbox, .x-form-label,.x-form-field-label,.x-form-radio, but don't work. Are these the elements equivalents to unicheckbox, unilabel, uniradiobutton and field labels? How can I do this? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
GerhardV Posted April 12, 2018 Share Posted April 12, 2018 You can right click on the checkbox label in Chrome and select "Inspect element". Then you would be able to see in the developer panel what the actual CSS selector is for the checkbox label and not the check. For the Triton theme for example: .x-form-cb-label-default { margin-top: 6px; font: 400 13px/17px Fira Sans Condensed, sans-serif; color: #404040; } In your CustomCSS if you just want the font size to be different you only need to have the following then: .x-form-cb-label-default { font: 400 13px/17px Open Sans, sans-serif; } You don't always have to include !important - have to use it very wisely as you force an overriding. https://css-tricks.com/when-using-important-is-the-right-choice/ Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 12, 2018 Author Share Posted April 12, 2018 Sorry, but this don't work: --------- In your CustomCSS if you just want the font size to be different you only need to have the following then: .x-form-cb-label-default { font: 400 13px/17px Open Sans, sans-serif; } ----------- I put it in servermodule-customcss, but does nothing different. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 12, 2018 Author Share Posted April 12, 2018 sorry. it's for checkbox label. it works. thanks. the same for radiobutton, labels and fieldlabels? thanks. Quote Link to comment Share on other sites More sharing options...
GerhardV Posted April 12, 2018 Share Posted April 12, 2018 As I said - "You can right click on the checkbox label in Chrome and select "Inspect element". Then you would be able to see in the developer panel what the actual CSS selector is for the checkbox label and not the check." Doing the above ... you can inspect the composition of the element. Typically for check boxes and radio buttons it is composed of a label and an image / FontAwsome meaning two CSS selectors, one for each. See the image for details...what you are looking for is in the class attribute. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 13, 2018 Author Share Posted April 13, 2018 ok. thanks. can I have custoncss in a separated file and load at sesion init? thanks. Quote Link to comment Share on other sites More sharing options...
GerhardV Posted April 15, 2018 Share Posted April 15, 2018 Yes you can. Just add the following to Servermodule => CustomFiles: files/css/MyCustomCSSFile.css Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 15, 2018 Author Share Posted April 15, 2018 Ok. Is not that I'm looking for, because this needs to restart the server. Could be better to load the css at sesion init, like when the user changes the theme. changin theme, no restar is needed, only session restart. Quote Link to comment Share on other sites More sharing options...
Masteritec Posted July 11, 2019 Share Posted July 11, 2019 Hi, How to set the checkbox label text color when the checkbox is disable using CSS? Anybody can help? Thank you Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 11, 2019 Share Posted July 11, 2019 1 hour ago, Masteritec said: How to set the checkbox label text color when the checkbox is disable using CSS? Hello, 1. UniServerModule.CustomCSS: .myChBox.x-item-disabled .x-form-item-label { color: green; font-weight: bold; } 2. UniCheckBox.LayoutConfig.Cls = myChBox ? Quote Link to comment Share on other sites More sharing options...
Masteritec Posted July 11, 2019 Share Posted July 11, 2019 1 hour ago, Sherzod said: UniCheckBox.LayoutConfig.Cls = myChBox How to set using Delphi Coding? If i set using checkbox property, also cannot set checkbox text color Quote Link to comment Share on other sites More sharing options...
Masteritec Posted July 12, 2019 Share Posted July 12, 2019 9 hours ago, Masteritec said: How to set using Delphi Coding? If i set using checkbox property, also cannot set checkbox text color Any update on this? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 12, 2019 Share Posted July 12, 2019 2 hours ago, Masteritec said: Any update on this? 11 hours ago, Masteritec said: If i set using checkbox property, also cannot set checkbox text color Sorry, please explain in more details. Create a test case, let's say on the VCL, if possible, because I don’t fully understand your request. Quote Link to comment Share on other sites More sharing options...
Masteritec Posted July 12, 2019 Share Posted July 12, 2019 30 minutes ago, Sherzod said: Sorry, please explain in more details. Create a test case, let's say on the VCL, if possible, because I don’t fully understand your request. When check box enabled = false, I just want change the check box color to blue . Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 12, 2019 Share Posted July 12, 2019 2 minutes ago, Masteritec said: When check box enabled = false, I just want change the check box color to blue . Can you reproduce on VCL and attach the testcase? Quote Link to comment Share on other sites More sharing options...
Masteritec Posted July 12, 2019 Share Posted July 12, 2019 2 minutes ago, Sherzod said: Can you reproduce on VCL and attach the testcase? Just drop a unicheckbox set the enabled to false, then I want the text color to blue. And enabled to true just change back to black I want to use CSS to control only. Quote Link to comment Share on other sites More sharing options...
Masteritec Posted July 12, 2019 Share Posted July 12, 2019 2 hours ago, Sherzod said: Can you reproduce on VCL and attach the testcase? Click the Radio button Enabled = False then TuniEdit Text will change to Blue using CSS but Checkbox label no change at all Please check Checkbox Label Color CSS.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 12, 2019 Share Posted July 12, 2019 7 minutes ago, Masteritec said: Please check Checkbox Label Color CSS.zip Ok, we will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 12, 2019 Share Posted July 12, 2019 7 hours ago, Masteritec said: Click the Radio button Enabled = False then TuniEdit Text will change to Blue using CSS but Checkbox label no change at all Can you check with this CSS? ._x-item-disabled .x-form-field { opacity: 1; -moz-opacity: 1; filter: alpha(opacity=100); color: blue; background: #F0F0F0; } ._mydisabledCheckBox .x-form-cb-label-default { opacity: 1; -moz-opacity: 1; filter: alpha(opacity=100); color: blue; background: #F0F0F0; } 1 Quote Link to comment Share on other sites More sharing options...
Masteritec Posted July 12, 2019 Share Posted July 12, 2019 51 minutes ago, Sherzod said: Can you check with this CSS? ._x-item-disabled .x-form-field { opacity: 1; -moz-opacity: 1; filter: alpha(opacity=100); color: blue; background: #F0F0F0; } ._mydisabledCheckBox .x-form-cb-label-default { opacity: 1; -moz-opacity: 1; filter: alpha(opacity=100); color: blue; background: #F0F0F0; } Great, is work. Thanks your 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.