Freeman35 Posted June 10, 2018 Share Posted June 10, 2018 Hello, How can make moveble form? Form is modal and BorderStyle:=bsNone. (form like on screenshot) regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 10, 2018 Share Posted June 10, 2018 Hello, What kind of form? Did you create the form as in the picture? Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted June 11, 2018 Author Share Posted June 11, 2018 Hi, Its a Standart Tuniform, "Header" is TUnilabel and Align is alTop. I added that screenshot, 'cos much better then my english form has not caption BorderStyle:=bsNone, so can't move. Question is, user how can move this form ? regards Quote Link to comment Share on other sites More sharing options...
mhmda Posted June 16, 2018 Share Posted June 16, 2018 http://forums.unigui.com/index.php?/topic/7941-change-form-border/&do=findComment&comment=41408 Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted June 18, 2018 Share Posted June 18, 2018 procedure TForm.panelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); const sc_DragMove = $f012; begin ReleaseCapture; Perform(wm_SysCommand, sc_DragMove, 0); end; this works in vcl, click on the panel and drag the form Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted June 19, 2018 Author Share Posted June 19, 2018 Thank you for answers. Sorry for late answer, you know bairam @mohammad, Your demo compiled old unigui, so not work on your server. And my question is, can you move that form via mouse? @wilton_rad Is vcl mean, non unigui application? If yes how to apply to this to unigui application? Regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 19, 2018 Share Posted June 19, 2018 Hi, Also you can try this approach I think: function window.afterrender(sender, eOpts) { var me = sender; me.dd = new Ext.dd.DDProxy(me, { delegate: me.id }); me.dd.afterDrag = (function() { me.updateLayout() }); Ext.onReady(function() { Ext.get(me.id).select(".x-form-field").each(function(el) { me.dd.addInvalidHandleId(el.dom.id) }) }); me.el.setStyle('cursor', 'move'); } http://forums.unigui.com/index.php?/topic/4567-move-tuniform-without-titlebar/ http://forums.unigui.com/index.php?/topic/6321-ot-javascript-profis-dragdrop-of-unipanel/ ... Quote Link to comment Share on other sites More sharing options...
mhmda Posted June 19, 2018 Share Posted June 19, 2018 I updated my original post and working as expected. Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted June 19, 2018 Author Share Posted June 19, 2018 @Delphi Developer one more perfect solution thank you very much. @mohammad Thank you very much. Quote Link to comment Share on other sites More sharing options...
Point Posted October 7, 2018 Share Posted October 7, 2018 On 6/19/2018 at 6:51 PM, Sherzod said: Hi, Also you can try this approach I think: function window.afterrender(sender, eOpts) { var me = sender; me.dd = new Ext.dd.DDProxy(me, { delegate: me.id }); me.dd.afterDrag = (function() { me.updateLayout() }); Ext.onReady(function() { Ext.get(me.id).select(".x-form-field").each(function(el) { me.dd.addInvalidHandleId(el.dom.id) }) }); me.el.setStyle('cursor', 'move'); } http://forums.unigui.com/index.php?/topic/4567-move-tuniform-without-titlebar/ http://forums.unigui.com/index.php?/topic/6321-ot-javascript-profis-dragdrop-of-unipanel/ ... this code moves the form with all the controls in it. how to move the form with just one control, for example only the unipanel1 can move the form. I tried to modify the code but it didn't work :). Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 7, 2018 Share Posted October 7, 2018 Hello, Can you try this ?: function window.afterrender(sender, eOpts) { var me = sender; me.dd = new Ext.dd.DDProxy(me, { delegate: me.id }); me.dd.afterDrag = (function() { me.updateLayout() }); Ext.onReady(function() { //Ext.get(me.id).select(".x-form-field").each(function(el) { // me.dd.addInvalidHandleId(el.dom.id) //}); me.dd.setHandleElId(MainForm.UniPanel1.id); //<--------- }); //me.el.setStyle('cursor', 'move'); } Quote Link to comment Share on other sites More sharing options...
Point Posted October 7, 2018 Share Posted October 7, 2018 hi sherzord, thanks for the response. i'm sorry sherzord, but the code doesn't work on its derivative form. and usually when the unigui form is moved there appears with color opacity, but not here Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 7, 2018 Share Posted October 7, 2018 If possible, can you make a simple testcase for this..? Quote Link to comment Share on other sites More sharing options...
Point Posted October 7, 2018 Share Posted October 7, 2018 hi sherzod, here a testcase... DRAG FORM.7z Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 7, 2018 Share Posted October 7, 2018 Ok, thank you I will check Quote Link to comment Share on other sites More sharing options...
Point Posted October 7, 2018 Share Posted October 7, 2018 Its seem I should rename the parent form name on each child form, or is there a more concise method ? Quote Link to comment Share on other sites More sharing options...
Point Posted October 7, 2018 Share Posted October 7, 2018 the method I mean here is without changing the name of the form on each derivative. Quote Link to comment Share on other sites More sharing options...
Point Posted October 15, 2018 Share Posted October 15, 2018 finally i found without having to change the form name , sory me, extjs newbie function window.afterrender(sender, eOpts) { var me = sender; me.dd = new Ext.dd.DDProxy(me, { delegate: me.id }); me.dd.afterDrag = (function() { me.updateLayout() }); Ext.onReady(function() { me.dd.setHandleElId(sender.owner.UniPanel1.id); }); } Quote Link to comment Share on other sites More sharing options...
SayeyeZohor Posted July 26, 2019 Share Posted July 26, 2019 function window.afterrender(sender, eOpts) { var me = sender; me.dd = new Ext.dd.DDProxy(me, { delegate: me.id }); me.dd.afterDrag = (function() { me.updateLayout() }); Ext.onReady(function() { me.dd.setHandleElId(sender.owner.UniPanel1.id); }); } doesn't work ... Behind another form falls and not work @Sherzod @Farshad Mohajeri Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 26, 2019 Share Posted July 26, 2019 55 minutes ago, SayeyeZohor said: doesn't work ... Behind another form falls and not work Can you make a simple testcase for this?! Quote Link to comment Share on other sites More sharing options...
SayeyeZohor Posted July 26, 2019 Share Posted July 26, 2019 29 minutes ago, Sherzod said: Can you make a simple testcase for this?! to this case is not working ... and can not make similar case please remote to my pc Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 26, 2019 Share Posted July 26, 2019 I replied... Quote Link to comment Share on other sites More sharing options...
SayeyeZohor Posted July 26, 2019 Share Posted July 26, 2019 i have a new problam @Sherzod @Farshad Mohajeri Quote Link to comment Share on other sites More sharing options...
SayeyeZohor Posted July 27, 2019 Share Posted July 27, 2019 I when scroll with scrollbar in form, form is moving Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 27, 2019 Share Posted July 27, 2019 52 minutes ago, SayeyeZohor said: I when scroll with scrollbar in form, form is moving I couldn't reproduce. 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.