Jump to content


Photo

How to move BorderStyle=bsNone Modal form


  • Please log in to reply
9 replies to this topic

#1 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 348 posts

Posted 10 June 2018 - 11:17 AM

Hello,

How can make moveble form? Form is modal and BorderStyle:=bsNone. (form like on screenshot)

regards

Attached Files


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 5177 posts

Posted 10 June 2018 - 04:18 PM

Hello,

 

What kind of form? Did you create the form as in the picture?


  • 0

#3 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 348 posts

Posted 11 June 2018 - 06:49 AM

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


  • 0

#4 mohammad

mohammad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 835 posts
  • LocationKufur Kassem, Palestine

Posted 16 June 2018 - 10:14 AM

http://forums.unigui...der/#entry41408
  • 0

#5 wilton_rad

wilton_rad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 126 posts

Posted 18 June 2018 - 02:10 PM

 
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


  • 0

#6 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 348 posts

Posted 19 June 2018 - 09:21 AM

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


  • 0

#7 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 5177 posts

Posted 19 June 2018 - 11:51 AM

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...thout-titlebar/

http://forums.unigui...op-of-unipanel/

...


  • 0

#8 mohammad

mohammad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 835 posts
  • LocationKufur Kassem, Palestine

Posted 19 June 2018 - 12:18 PM

I updated my original post and working as expected.  


  • 0

#9 Freeman35

Freeman35

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 348 posts

Posted 19 June 2018 - 12:55 PM

@Delphi Developer one more perfect solution :)  thank you very much.

@mohammad Thank you very much.


  • 0

#10 CoderU

CoderU

    Member

  • Members
  • PipPip
  • 11 posts

Posted 12 July 2018 - 04:22 PM

del


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users