Is there a way to set position of a dialog after it is opened?

Started by Hypersonic, January 01, 2008, 12:12:39 PM

Previous topic - Next topic

Hypersonic


i.e. to enable automatically "sliding" the dialog out of the way?

Thanks!

BazzaCAD

You can move it on SHOW:

(Setq rValue (dcl_Form_Show Project1_Form1
     [Optional]  UpperLeftXCoordinate [as Integer]
     [Optional]  UpperLeftYCoordinate [as Integer]))

Owen can you clarify something for me? You mention before you could move a form on OnInitialize:
https://sourceforge.net/tracker/index.php?func=detail&aid=1810592&group_id=187950&atid=923363

How do we do this? With (dcl_form_resize) or (dcl_control_setpos) or something else?
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

BazzaCAD

Owen, Also what's the best way to get the Height & Width of a form?
I've learned from you that we can use:
(dcl_Control_GetHeight (car (dcl_Form_GetControls Proj_Form)))
But that includes the Titlebar & borders.
I'm assuming this will be different for each version of windows & VisualStyles, it makes things difficult to figure out what's on the users end.
Since we changed the Forms properties (Height & Width) to no longer include the TitleBar & borders for functions like (dcl_Form_Resize),
It would be nice if there was an opposing function to get the Height & Width without the TitleBar & borders included.
Maybe something like: (dcl_Form_GetSize)
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

owenwengerd

Barry, you should be able to call either (dcl_form_resize) or (dcl_form_setpos) during OnInitialize. Also, (dcl_Control_GetHeight (car (dcl_Form_GetControls Proj_Form))) returns the client height (i.e. not including the title bar or border) *unless* it's an older form that was created before sizes used the client area. With newly created forms, all sizes should be client sizes, and should be correct and consistent on all platforms.
Owen Wengerd (Outside The Box) / ManuSoft

BazzaCAD

Is there a way to tell/check what version a for was created in?
If you have a look at JTHWAMAN sample form here:
http://www.opendcl.com/forum/index.php?topic=127.msg507#msg507
It returns the forms Height/Width with the TitleBar & borders dimensions (so I guess it's an older form).
Is there a way to convert\upgrade the form to use the new client area code?
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom