FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour get is not in front of saying
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
get is not in front of saying
Posted: Thu Mar 09, 2006 10:36 PM

I can not find the say staements located in the same row of get rows ? Any explaination ???

@ 1, 1 SAY "&Account No." OF oDlg
@ 1, 9 SAY ":" OF oDlg
@ 1, 10 GET V_CU_ACCT OF oDlg

@ 2, 1 SAY "&Name" OF oDlg
@ 2, 9 SAY ":" OF oDlg
@ 2, 10 GET V_CU_NAME OF oDlg

Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
Re: get is not in front of saying
Posted: Fri Mar 10, 2006 07:08 AM
I don't know how I can help you, but this is a typical problem with dialogs controls when created from code.
It has to do with the current font, and if the font is proportional (e.g. Ms Sans Serif or Arial), the controls are no more like it used to be in MS-DOS because of the width (mainly) of the strings (SAYs or GETs).

One simple solution is to use the clause PIXELS for each SAY and GET, combined with the SIZE of these controls and finally, until you succeed, assign a color for all SAYs (GETs are having a frame so you can see how much space is occupied on dialog).

An example:

cGet := "Hello there   "
DEFINE DIALOG odlg FROM 0,0 to 150,200 PIXELS
   @3,5 SAY oSay PROMPT "Type something:" OF odlg SIZE 85, 10 PIXELS COLOR CLR_YELLOW, CLR_GREEN
   @3,85 GET oGet VAR cGet OF odlg SIZE 100,12 PIXELS COLOR CLR_RED, CLR_WHITE
ACTIVATE DIALOG odlg CENTERED


I hope that this will put you to the right direction, and if not, I'm sorry to waste your time :-)

Kind regards
Evans
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
get is not in front of saying
Posted: Fri Mar 10, 2006 07:18 AM

Ehab,

rows positions are different for each kind of control, just to avoid that they overlap. i.e.:

@ 1, 1 GET ...
@ 2, 1 GET ...

the second GET will not be placed over the first one. As the controls have different heights, then sometimes they are shown in different positions. To fix it, you may use decimals numbers:

@ 1.4, 1 SAY ...
@ 1, 1 GET ...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
get is not in front of saying
Posted: Fri Mar 10, 2006 09:51 AM

Antonio,
Thanks for the input, however, I have aleady discovered that each kind of control has different position in screen, even if we use the same numbers.
For example a button @1.0, 1.0 does not correspond with a get @1.0, 1.0

Why is all this happening?

On a personal work level, I follow the approach of using PIXELS, thus, elimintating the problem, but I still need testing with dialogs created from code.... I though that all the coordinates of the controls are based upon the dialog's font, but alas... what can we do

:wink:

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
get is not in front of saying
Posted: Fri Mar 10, 2006 10:11 AM

You may try to play with constant.ch.

EMG

Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
get is not in front of saying
Posted: Fri Mar 10, 2006 12:49 PM

Can you give me clue about what will be changed in constant.ch ?

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
get is not in front of saying
Posted: Fri Mar 10, 2006 01:28 PM

As an example, try to change:

define SAY_CHARPIX_H 15

define SAY_CHARPIX_W 6

and then recompile say.prg.

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
get is not in front of saying
Posted: Fri Mar 10, 2006 06:30 PM

Evans,

> Why is all this happening?

Because controls have different heights and we don't want them to overlapp if you do, i.e.:

@ 1, 1 BUTTON ...
@ 2, 1 BUTTON ...

You don't want the second button to be over the first one.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion