Why is SAY_CHARPIX_H != GET_CHARPIX_H

Post Reply
dmajkic
Posts: 14
Joined: Fri Mar 02, 2012 11:08 am

Why is SAY_CHARPIX_H != GET_CHARPIX_H

Post by dmajkic »

The problem I have is that simple code like this

Code: Select all

DEFINE DIALOG oDlg TITLE "REPLACE" SIZE 300, 250
   @ 1, 1 SAY "REPLACE :"
   @ 1, 5 GET cField OF oDlg
   @ 2, 1 SAY "WITH    :"
   @ 2, 5 GET cWith OF oDlg
   ...
misplace positions of labels and textedit boxes, like this:

Image

I don't use pixels, as I need to port existing text based app to fwh frontend.
How can this misplacement be avoided? Is there a way of SAY/GET usage that I'm missing?
kok joek hoa
Posts: 117
Joined: Tue Jan 03, 2006 6:18 pm

Re: Why is SAY_CHARPIX_H != GET_CHARPIX_H

Post by kok joek hoa »

Dear dmajkic,

try this one :

Code: Select all

#include "FiveWin.ch"

function Main()
    local odlg
    local cField :=space(20)
    local cWith  :=space(20)
    local ofont  
    
    define font ofont name 'courier' size 0,10
    
    DEFINE DIALOG oDlg TITLE "REPLACE" SIZE 300, 250
        @ 1  ,1 SAY "REPLACE :"  font ofont
        @ 1  ,6 GET cField OF oDlg
        @ 1.8,1 SAY "WITH    :" font ofont
        @ 2  ,6 GET cWith OF oDlg
        
    activate dialog odlg center
    
    ofont:end()

return nil 
regards,

kok
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Why is SAY_CHARPIX_H != GET_CHARPIX_H

Post by Antonio Linares »

Because SAYs and GETs heights are differents...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply