Many times I experience difficulty in placing the controls in a window to decide the exact coordinates. What is the simplest and reliable way to find the top,left,bottom and right of the display area of a window, after removing the area occupied by button bar and message bar?
For example if i want to position a control at 0,0 then I need to say something like @ IIF( oWnd:oBar:nMode == 1, oWnd:oBar:nHeight, 0 ), IIF( oWnd:oBar:nMode == 2, oWnd:oBar:nWidth, 0 ) CONTROL .... .
Similarly if I have to set the height of a control to occupy full window heght, I may have to say something like oWnd:GetCliRect():nHeight - oWnd:oBar:nheight - oWnd:oMsgBar:nHeight ....
Is there a better and simpler way to find these coordinates? Can Window class be improved to provide these values like oWnd:ClientTop ,, etc ?
How to find coordinates of display area of window
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
How to find coordinates of display area of window
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
NageswaraRao,
The buttonbar and the messagebar are also controls, in the same way as SAYs, GETs, Buttons, etc.
You just need to use oBar:nHeight and oMsgBar:nHeight to calculate the right coordinates for the other controls
When you do oWnd:oClient = oControl the FWH calculates the remaining client area automatically
The buttonbar and the messagebar are also controls, in the same way as SAYs, GETs, Buttons, etc.
You just need to use oBar:nHeight and oMsgBar:nHeight to calculate the right coordinates for the other controls
When you do oWnd:oClient = oControl the FWH calculates the remaining client area automatically
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact: