jahlxx Posted November 17, 2016 Share Posted November 17, 2016 Hi. How can I limit the drag of a form to his parent area? When drag a form, the user can drag out the parent, then he/she can't see the form border. Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 17, 2016 Share Posted November 17, 2016 Hi, Can you clarify your question again? Best regards. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted November 17, 2016 Author Share Posted November 17, 2016 Ok. Open any demo of unigui, with forms. Drag the form to the top of your screen. You will see that I say. The header of form disappears, and you can't drag again. Quote Link to comment Share on other sites More sharing options...
estrify Posted November 17, 2016 Share Posted November 17, 2016 Hi, The following might help you: add into Your form -> ClientEvents -> UniEvents -> Ext.window.Window -> window.beforeInit the following line: sender.constrainHeader = true; Regards, Quote Link to comment Share on other sites More sharing options...
jahlxx Posted November 17, 2016 Author Share Posted November 17, 2016 Perfect!!!! Thanks. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted November 17, 2016 Author Share Posted November 17, 2016 Other thing I see in forms, is that I can't minimize them. I see the minimize and maximize buttons. I can maximize but not minimize. Maybe, I've forgotten something? Thanks. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted November 17, 2016 Administrators Share Posted November 17, 2016 Minimize is not implemented, because there is no desktop! Quote Link to comment Share on other sites More sharing options...
jahlxx Posted November 17, 2016 Author Share Posted November 17, 2016 ok. any workaround? could be interesting minimize a form into its parent. thanks. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted November 18, 2016 Share Posted November 18, 2016 Hi, Workaround for Minimize-Maximize. form -> ClientEvents -> UniEvents -> Ext.window.Window -> window.beforeInit sender.constrainHeader = true; config.tools = [{ type: 'restore', handler: function (evt, toolEl, owner, tool) { var window = owner.up('window'); window.setWidth(1182); // <-- Your actual form width window.expand('', false); window.center(); } }]; form -> ClientEvents -> ExtEvents -> Ext.window.Window -> window.minimize sender.collapse(); sender.setWidth(150); sender.alignTo(Ext.getBody(), 'bl-bl'); form -> ClientEvents -> UniEvents -> Ext.window.Window -> window.beforeInit Quote Link to comment Share on other sites More sharing options...
jahlxx Posted November 18, 2016 Author Share Posted November 18, 2016 ok, works. has a extrange behaviour but works. 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.