jahlxx Posted November 17, 2016 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
Sherzod Posted November 17, 2016 Posted November 17, 2016 Hi, Can you clarify your question again? Best regards. Quote
jahlxx Posted November 17, 2016 Author 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
estrify Posted November 17, 2016 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
jahlxx Posted November 17, 2016 Author 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
Administrators Farshad Mohajeri Posted November 17, 2016 Administrators Posted November 17, 2016 Minimize is not implemented, because there is no desktop! Quote
jahlxx Posted November 17, 2016 Author Posted November 17, 2016 ok. any workaround? could be interesting minimize a form into its parent. thanks. Quote
Hayri ASLAN Posted November 18, 2016 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
jahlxx Posted November 18, 2016 Author Posted November 18, 2016 ok, works. has a extrange behaviour but works. 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.