Finding out dialog size

Finding out dialog size

Postby HunterEC » Fri Nov 22, 2013 9:16 am

Guys:

I want to display a button 50 pixels before a dialog's rightmost position. For example if the dialog is 600 pixels wide the button will be at position 550.
Is there a way to find out the dialog width and height in pixels ? Thank you.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Finding out dialog size

Postby Enrico Maria Giordano » Fri Nov 22, 2013 12:13 pm

Try:

Code: Select all  Expand view
oDlg:nWidth()
oDlg:nHeight()


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

Re: Finding out dialog size

Postby ukoenig » Fri Nov 22, 2013 10:48 pm

Gustavo,

A komplete sample, to move and resize a dialog with adjusting the button-position
to the dialog bottom / right.
I added a INI to save and restore the dialog.
You can detect the dialog EXIT-status ( button, system-button or RETURN )
of the dialog. It can be displayed on right mouseclick inside the main-window.
Maybe this sample can answer some of Your questions.

Download ( complete with prg, exe and make ) :
http://www.pflegeplus.com/fw_download/dlgtest1.zip

Image

Image

Image

to save and restore the dialog size and position
nDWidth := oDlg:nRight
nDHeight := oDlg:nBottom

is used
To calculate the button-position on bottom / right,
oDlg:nWidth and oDlg:nHeight is needed

Image

Best regards
Uwe :lol:
Last edited by ukoenig on Sun Nov 24, 2013 12:48 pm, edited 2 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Finding out dialog size

Postby HunterEC » Sun Nov 24, 2013 7:16 am

Uwe, Enrico:

Thank you very much !
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am


Return to FiveWin for Harbour/xHarbour

Who is online

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