get is not in front of saying

get is not in front of saying

Postby Ehab Samir Aziz » 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
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Re: get is not in front of saying

Postby E. Bartzokas » Fri Mar 10, 2006 7: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:

Code: Select all  Expand view  RUN
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
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby Antonio Linares » Fri Mar 10, 2006 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby E. Bartzokas » Fri Mar 10, 2006 9: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:
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby Enrico Maria Giordano » Fri Mar 10, 2006 10:11 am

You may try to play with constant.ch.

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

Postby Ehab Samir Aziz » Fri Mar 10, 2006 12:49 pm

Can you give me clue about what will be changed in constant.ch ?
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Postby Enrico Maria Giordano » Fri Mar 10, 2006 1:28 pm

As an example, try to change:

#define SAY_CHARPIX_H 15
#define SAY_CHARPIX_W 6

and then recompile say.prg.

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

Postby Antonio Linares » Fri Mar 10, 2006 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: SantaCroya and 62 guests