freedowsRoO Posted May 22, 2019 Share Posted May 22, 2019 Hi guys! Is there a way to remove ext events at runtime? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 22, 2019 Share Posted May 22, 2019 1 hour ago, freedowsRoO said: Is there a way to remove ext events at runtime? Hi, Can you please explain in more details? 1 Quote Link to comment Share on other sites More sharing options...
freedowsRoO Posted May 23, 2019 Author Share Posted May 23, 2019 13 hours ago, Sherzod said: Hi, Can you please explain in more details? Sure @Sherzod, i have a component with the following code: ClientEvents.ExtEvents.Add:=('added=function added(sender, container, pos, eOpts){ sender.resizable= true; sender.draggable= true; }'); Is there a way to remove this code or set resizeble and draggable to false in runtime? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 23, 2019 Share Posted May 23, 2019 6 hours ago, freedowsRoO said: Is there a way to remove this code or set resizeble and draggable to false in runtime? For Draggable: function added(sender, container, pos, eOpts) { sender.resizable= true; //sender.draggable= true; } Then, in Runtime: UniPanel1.Draggable.Enabled := True/False; 2 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 23, 2019 Share Posted May 23, 2019 6 hours ago, freedowsRoO said: Is there a way to remove this code or set resizeble and draggable to false in runtime? For Resizable: function added(sender, container, pos, eOpts) { sender.resizable= true; //sender.draggable= true; } Stop: UniPanel1.JSInterface.JSCall('resizer.destroy', []); Resume: UniPanel1.JSInterface.JSCall('initResizable', []); 1 Quote Link to comment Share on other sites More sharing options...
freedowsRoO Posted May 24, 2019 Author Share Posted May 24, 2019 Thank you! 1 Quote Link to comment Share on other sites More sharing options...
herculanojs Posted November 18, 2019 Share Posted November 18, 2019 On 5/23/2019 at 2:19 PM, Sherzod said: For Resizable: function added(sender, container, pos, eOpts) { sender.resizable= true; //sender.draggable= true; } Stop: UniPanel1.JSInterface.JSCall('resizer.destroy', []); Resume: UniPanel1.JSInterface.JSCall('initResizable', []); Is it possible to resize too many components, such as a UniMemo? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 18, 2019 Share Posted November 18, 2019 2 minutes ago, herculanojs said: Is it possible to resize too many components, such as a UniMemo? Hello, Sorry, what do you mean? Quote Link to comment Share on other sites More sharing options...
herculanojs Posted November 18, 2019 Share Posted November 18, 2019 1 minute ago, Sherzod said: Hello, Sorry, what do you mean? Is it possible to resize UniMemo runtime? I tried this approach but couldn't get result Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 18, 2019 Share Posted November 18, 2019 22 minutes ago, herculanojs said: I tried this approach but couldn't get result I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 19, 2019 Share Posted November 19, 2019 10 hours ago, herculanojs said: Is it possible to resize UniMemo runtime? Also you can use this approach I think. 1. UniContainerPanel ---> UniMemo (align = AlClient) 2. procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniMemo1.JSInterface do JSAddListener('afterrender', 'function(){this.setStyle("width", "100%");this.setStyle("height", "100%")}'); with UniContainerPanel1.JSInterface do JSAddListener('afterrender', 'function(){this.initResizable({'+ 'dynamic: true,'+ 'pinned: true,'+ 'handles: "s e se",'+ 'heightIncrement: 20,'+ 'widthIncrement: 20'+ '})}'); end; Quote Link to comment Share on other sites More sharing options...
herculanojs Posted November 19, 2019 Share Posted November 19, 2019 5 hours ago, Sherzod said: Also you can use this approach I think. 1. UniContainerPanel ---> UniMemo (align = AlClient) 2. procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniMemo1.JSInterface do JSAddListener('afterrender', 'function(){this.setStyle("width", "100%");this.setStyle("height", "100%")}'); with UniContainerPanel1.JSInterface do JSAddListener('afterrender', 'function(){this.initResizable({'+ 'dynamic: true,'+ 'pinned: true,'+ 'handles: "s e se",'+ 'heightIncrement: 20,'+ 'widthIncrement: 20'+ '})}'); end; It couldn't be this way, because I need to resize UniEdit, UniMemo, UniNumberEdit, etc ... 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.