Resizing a window

Post Reply
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Resizing a window

Post 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.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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 = ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply