Resizing a window

Resizing a window

Postby driessen » Thu Nov 08, 2007 12:55 pm

Hello,

In my application I have defined a window oWnd like this :
Code: Select all  Expand view
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  Expand view
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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Resizing a window

Postby Enrico Maria Giordano » Thu Nov 08, 2007 1:22 pm

Use oWnd:Move() method instead.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Thu Nov 08, 2007 1:54 pm

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 57 guests