chrisjohn82 Posted August 29, 2016 Posted August 29, 2016 Hi everybody,I wonder if it's possible to remove the clear button on the TuniDBNumberEdit and TuniDBFormattedNumberEdit. I could not find properties for this. I am using the controls in the web form and mobile form. The button will show as i start typing and in the textbox. Best regards Christian Quote
Sherzod Posted August 29, 2016 Posted August 29, 2016 Hi, For now try, For example, UnimDBNumberEdit1->ClientEvents->UniEvents-> beforeInit fn: function beforeInit(sender, config) { config.clearIcon = false } Best regards. Quote
chrisjohn82 Posted August 29, 2016 Author Posted August 29, 2016 I tried in both controls and it did not work on the web control(did not get an error message but the "x" still shows and works) but i can't get it to work on the mobile either because i already have code for the color code and if i try the code below i get an error that says "unexpected identifier 'sender'" and onEnter and onExit i have the following code below. If i remove the code in beforeinit and comment out the code in onExit and onEnter it works but i want both. Code for the mobile control function beforeInit(sender, config) { config.clearIcon = false sender.setFieldStyle = function (a){ var b=this, c=Ext.get(b.element.select('.x-input-el').elements[0].id); if©{c.applyStyles(a)}b.element.fieldStyle=a } } OnExit for the numbercontrol (if i comment this code out, i get the clearbutton to disappear) procedure Tform5.edantalettExit(Sender: TObject); begin if not edantalett.ReadOnly then begin (Sender as TUnimDBNumberEdit).Color := clWhite end; end; OnEnter for the numbercontrol (if i comment this code out, i get the clearbutton to disappear) procedure Tform5.edantalettEnter(Sender: TObject); begin if not edantalett.ReadOnly then begin (Sender as TUnimDBNumberEdit).Color := clYellow end; end; Quote
chrisjohn82 Posted August 29, 2016 Author Posted August 29, 2016 I worked on the mobile i just had to add " ; " after the statement, but the code do not work for the web control. config.clearIcon = false; Quote
kkelchev Posted October 30, 2020 Posted October 30, 2020 Edit controls have property "ClearButton" by it seems does not works. If True or False ... clear button is always visible. In help is written for this propery : It defines if the control has a Clear button to erase all its content. In application there is cases where it should not be possible for user to clear edit value. How to do that ? Quote
Sherzod Posted October 30, 2020 Posted October 30, 2020 2 hours ago, kkelchev said: Edit controls have property "ClearButton" by it seems does not works. If True or False ... clear button is always visible. Hi, Can you please explain in more details? Which build are you using? UnimEdit? I couldn't reproduce this. Quote
kkelchev Posted October 30, 2020 Posted October 30, 2020 Hi , Thank for quick replay. I'm using last build. 1539. But i noticed this long before. Last time i do check for TuniDateTimePicker , just now with simple TiniDBEdit. Am I doing something in wrong way ? Thanks Kamen Quote
Sherzod Posted October 30, 2020 Posted October 30, 2020 2 hours ago, kkelchev said: In application there is cases where it should not be possible for user to clear edit value. ReadOnly = True ? 2 hours ago, kkelchev said: Edit controls have property "ClearButton" by it seems does not works. If True or False ... clear button is always visible. Can you make a simple testcase to see the issue? Quote
kkelchev Posted October 30, 2020 Posted October 30, 2020 User could EDIT value , but clear (null/empty) is NOT allowed . So readOnly=True is not solution. Here is 2 pictures Design and Runtime. Quote
Sherzod Posted October 30, 2020 Posted October 30, 2020 Hmm, Which theme are you using? Can you make a simple testcase to check? Quote
kkelchev Posted October 30, 2020 Posted October 30, 2020 Sorry , all that I say is happening with IE 11 only !!! Do framework still support IE 11 ? Thanks Kamen Quote
Sherzod Posted October 30, 2020 Posted October 30, 2020 6 minutes ago, kkelchev said: Do framework still support IE 11 ? https://docs.sencha.com/extjs/7.0.0/guides/supported_browsers.html 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.