TPages from source

TPages from source

Postby StefanHaupt » Tue May 22, 2007 6:59 pm

Hi,

is anyone using the tpages-class creating pages from source ?

I have great problems creating a page control and placing controls on the page. The coordinates (nTop,nLeft,nBottom,nRight) does not seem to be pixel coordinates nor text coordinates.

Code: Select all  Expand view
DEFINE DIALOG oDlg FROM  0, 0 TO 690,910 TITLE 'Event' PIXEL ;
          FONT oFnt1 COLOR CLR_BLACK,CLR_HGRAY

oPage := TPages():New(0,0, oDlg:nHeight-20,oDlg:nWidth, oDlg)


the sample above creates a page which is greater than the dialog itself. Why ?

Do I miss something ?

Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: TPages from source

Postby Enrico Maria Giordano » Tue May 22, 2007 7:32 pm

Try adding

Code: Select all  Expand view
ACTIVATE DIALOG oDlg;
         ON INIT oPage:Move( 0, 0, oDlg:nHeight-20, oDlg:nWidth )


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

Postby StefanHaupt » Wed May 23, 2007 8:13 am

Enrico,

thanks for your tip, but it does not work.

The result is, that the height of the page is greater than the height of the dialog and the width is smaller than the dialog width

I tried to insert a picture here, but I did not succeed. How can insert picture from the local disk ?

What now?

Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Antonio Linares » Wed May 23, 2007 8:17 am

Stefan,

There is a small typo in Enrico's code:
Code: Select all  Expand view
ACTIVATE DIALOG oDlg;
         ON INIT oPage:Move( 0, 0, oDlg:nWidth, oDlg:nHeight-20 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby StefanHaupt » Wed May 23, 2007 9:12 am

Antonio,

It´s working now

thanks


kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Enrico Maria Giordano » Wed May 23, 2007 10:16 am

Antonio Linares wrote:There is a small typo in Enrico's code:


Sorry.

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 19 guests