cdev Posted May 12, 2020 Posted May 12, 2020 Hi, I have a TUniEdit component with the following property: ClientEvents.ExtEvents.afterrender: function afterrender(sender, eOpts) { var me=sender; me.inputEl.setStyle('text-align','left'); me.setEmptyText('123'); me.inputEl.setStyle('background-image', 'url(./images/Required-a-16.png)'); me.inputEl.setStyle('background-repeat', 'no-repeat'); me.inputEl.setStyle('background-position', 'center right'); me.inputEl.setStyle('border', '1px solid #ff9999'); } this aligns the text in the edit area to the left, sets the emptyText to '123' to indicate we expect numeric input, sets a small icon at the right of the input area to indicate it is a required field and draws the borders of the input area in a red color. This works fine. What I want to do is to have initially that edit-component exactly the same without the red borders. Only when a button is clicked and there is no input in that component, that the borders get red. So, based on the input of that component the last line should be added or removed. (me.inputEl.setStyle('border', '1px solid #ff9999'); ) How do I do this in runtime ? Quote
Sherzod Posted July 26, 2020 Posted July 26, 2020 On 5/12/2020 at 1:41 PM, cdev said: How do I do this in runtime ? Hello, Sorry for the late response. Have you already managed? Quote
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.