Page 1 of 1

Why is SAY_CHARPIX_H != GET_CHARPIX_H

Posted: Mon Sep 03, 2012 12:52 pm
by dmajkic
The problem I have is that simple code like this

Code: Select all | Expand

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?

Re: Why is SAY_CHARPIX_H != GET_CHARPIX_H

Posted: Mon Sep 03, 2012 6:57 pm
by kok joek hoa
Dear dmajkic,

try this one :

Code: Select all | Expand

#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

Re: Why is SAY_CHARPIX_H != GET_CHARPIX_H

Posted: Mon Sep 03, 2012 7:12 pm
by Antonio Linares
Because SAYs and GETs heights are differents...