Why is SAY_CHARPIX_H != GET_CHARPIX_H

Why is SAY_CHARPIX_H != GET_CHARPIX_H

Postby dmajkic » Mon Sep 03, 2012 12:52 pm

The problem I have is that simple code like this

Code: Select all  Expand view
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?
dmajkic
 
Posts: 14
Joined: Fri Mar 02, 2012 11:08 am

Re: Why is SAY_CHARPIX_H != GET_CHARPIX_H

Postby kok joek hoa » Mon Sep 03, 2012 6:57 pm

Dear dmajkic,

try this one :

Code: Select all  Expand view
#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
kok joek hoa
 
Posts: 117
Joined: Tue Jan 03, 2006 6:18 pm

Re: Why is SAY_CHARPIX_H != GET_CHARPIX_H

Postby Antonio Linares » Mon Sep 03, 2012 7:12 pm

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

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 19 guests