Page 1 of 1

Resizing a window

Posted: Thu Nov 08, 2007 12:55 pm
by driessen
Hello,

In my application I have defined a window oWnd like this :

Code: Select all

DEFINE WINDOW oWnd FROM xTop,xLeft TO xBottom,xRight ...
After having changed the sizes of oWnd in a certain dialog box, I tried to change the sizes of my window (unfortunately without any succes) with this code :

Code: Select all

oWnd:nTop()    := xTop
oWnd:nLeft()   := xLeft
oWnd:nBottom() := xBottom
oWnd:nRight()  := xRight
oWnd:Refresh()
What do I do wrong ?

Of course, quitting and restarting my application solves the problem too, but that is not what I want.

Thanks a lot in advance.

Re: Resizing a window

Posted: Thu Nov 08, 2007 1:22 pm
by Enrico Maria Giordano
Use oWnd:Move() method instead.

EMG

Posted: Thu Nov 08, 2007 1:54 pm
by Antonio Linares
Michel,

You can also do it this way:

WndTop( oWnd:hWnd, xTop )
WndLeft( oWnd:hWnd, xLeft )
oWnd:nWidth = xWidth
oWnd:nHeight := xHeight

for controls, you can simply do:

oControl:nTop = ...
oControl:nLeft = ...