rtalmeida Posted November 16, 2018 Share Posted November 16, 2018 Hello, how can I make UniTreeView read-only? I did: UniTreeView1.ReadOnly: = Operation = 9; but it returns me the attached error. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 16, 2018 Share Posted November 16, 2018 Hello, It seems this question concerns ExtJS, you can open a ticket in support portal. But as a workaround, can you use Enabled property instead ? Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted November 16, 2018 Author Share Posted November 16, 2018 Using enable works, but it is not ideal for what I need, this is a query module, and the user needs to see what is or is not selected. To open a call on the support , what are the steps to this? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 16, 2018 Share Posted November 16, 2018 2 minutes ago, rtalmeida said: To open a call on the support , what are the steps to this? Please visit here: http://unigui.com/support/support-portal Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 16, 2018 Share Posted November 16, 2018 7 minutes ago, rtalmeida said: Using enable works, but it is not ideal for what I need, this is a query module, and the user needs to see what is or is not selected. Ok I will try to find a "solution"... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 16, 2018 Share Posted November 16, 2018 30 minutes ago, rtalmeida said: Using enable works, but it is not ideal for what I need, this is a query module, and the user needs to see what is or is not selected. Can you try this approach for now? 1. function beforeInit(sender, config) { config._readonly=false; } 2. function beforecheckchange(node, checked, e, eOpts) { return (!this._readonly) } ReadOnly=True: procedure TMainForm.UniBitBtn1Click(Sender: TObject); begin //readOnly = true with UniTreeView1.JSInterface do begin JSAssign('_readonly', [True]); JSCall('getSelectionModel().setLocked', [True]); end; end; ReadOnly=False: procedure TMainForm.UniBitBtn2Click(Sender: TObject); begin //readOnly = false with UniTreeView1.JSInterface do begin JSAssign('_readonly', [False]); JSCall('getSelectionModel().setLocked', [False]); end; end; Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted November 16, 2018 Author Share Posted November 16, 2018 ok, I'll try. Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted November 16, 2018 Author Share Posted November 16, 2018 Thank you, it worked like I needed it. 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.