Jump to content
uniGUI Discussion Forums
Freeman35

How to move BorderStyle=bsNone Modal form

Recommended Posts

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

Share this post


Link to post
Share on other sites
 
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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/

...

Share this post


Link to post
Share on other sites

I updated my original post and working as expected.  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×