First steps

First steps

Postby MarcoBoschi » Tue Apr 02, 2013 1:32 pm

Sometimes I have to prepare a simple dialog to test some functions.
Some Says , some gets and Button that invokes a function
As you can see in the picture Says and Gets are not aligned
although the coordinates of SAY and GET are identical


Is there a trick to make sure that they are aligned?
I.E to use a particular font or something else?

Image

Code: Select all  Expand view  RUN
#include "fivewin.ch"
FUNCTION MAIN()

LOCAL oDlg
LOCAL oSay1 , oSay2 , oSay3
LOCAL oGet1 , oGet2 , oGet3
LOCAL cGet1 , cGet2 , cGet3

LOCAL oButton

cGet1 := SPACE( 20 )
cGet2 := SPACE( 20 )
cGet3 := SPACE( 20 )

DEFINE DIALOG oDlg FROM 3 , 3 TO 400 , 400 PIXEL

@ 2 , 2 SAY oSay1  PROMPT "First"  OF oDlg
@ 4 , 2 SAY oSay2  PROMPT "Second" OF oDlg
@ 6 , 2 SAY oSay3  PROMPT "Third"  OF oDlg

@ 2 , 10 GET oGet1 VAR cGet1 OF oDlg
@ 4 , 10 GET oGet2 VAR cGet2 OF oDlg
@ 6 , 10 GET oGet3 VAR cGet3 OF oDlg

@ 8 , 10 BUTTON oButton ACTION MsgInfo( "TEST" )

ACTIVATE DIALOG oDlg CENTER

RETURN NIL
 
User avatar
MarcoBoschi
 
Posts: 1066
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: First steps

Postby Silvio.Falconi » Tue Apr 02, 2013 2:13 pm

Marco,

I made a good sample to create easy dialogs here :
viewtopic.php?p=135888#p135888
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: First steps

Postby MarcoBoschi » Tue Apr 02, 2013 2:41 pm

Very Good!
many thanks
marco
User avatar
MarcoBoschi
 
Posts: 1066
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: First steps

Postby Enrico Maria Giordano » Tue Apr 02, 2013 5:56 pm

Marco,

use pixel coordinates.

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

Re: First steps

Postby Otto » Tue Apr 02, 2013 7:25 pm

Hello Marco,

I would suggest you following – the most comfortable way I found.
1) Create your dialog with Visual Union for Fivewin.
2) Generate source code from your visual design.
3) Afterwards you can use AUTOCODE to edit every line in a visual style.

Best regards,

Otto
Image

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: First steps

Postby MarcoBoschi » Wed Apr 03, 2013 11:44 am

Thank you
Silvio
Enrico
Otto
User avatar
MarcoBoschi
 
Posts: 1066
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: First steps

Postby Antonio Linares » Wed Apr 03, 2013 12:27 pm

Marco,

As Enrico has pointed:

@ ..., ... SAY ... OF ... PIXEL

@ ..., ... GET ... OF ... PIXEL

the PIXEL clause avoids any calculations. What you write is what you get.

Besides that, you can use the SIZE clause to specify some desired dimensions:

@ ..., ... SAY ... OF ... PIXEL SIZE ..., ... // nWidth and nHeight

@ ..., ... GET ... OF ... PIXEL SIZE ..., ...
regards, saludos

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

Re: First steps

Postby Antonio Linares » Wed Apr 03, 2013 12:29 pm

Otto,

FiveWin provides a samples/fiveform.prg utility that it is a forms designer that generates source code :-)

The good thing is that we also have it for FiveLinux and FiveMac, and we provide full source code for it. So you can even include it in your own apps :-)

Finally, where do you download Visual Union from ? We do have it at FiveWin-contributions:
https://code.google.com/p/fivewin-contributions/downloads/list
but not sure if that is the latest version
regards, saludos

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

Re: First steps

Postby Otto » Wed Apr 03, 2013 5:08 pm

Hello Antonio,
thank you for the information.
I don’t know how it happened but I forgot about the existence of fiveform.
I tested now and I replace Visual Union. The version I have is of Visual Union is from 2008.
This is exactly what I was looking for.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: First steps

Postby James Bott » Thu Jun 27, 2013 1:10 am

Antonio,

I have just tried to compile fiveform.prg and I am getting some linking errors. Which Libs am I missing?

Using FW 13.04 and BCC 5.82 and the standard Buildx.bat file.

James

xHarbour 1.2.3 Intl. (SimpLex) (Build 20130326)
Copyright 1999-2013, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'fiveform.prg' and generating preprocessed output to 'fiveform.ppo'...

...

Generating C source output to 'fiveform.c'...
Done.

Lines 886, Functions/Procedures 35, pCodes 4934
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
fiveform.c:
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_EXECUTE' referenced from C:\FWH\SAMPLES\FIVEFORM.OBJ
Error: Unresolved external '_HB_FUN_HB_SETCLSHANDLE' referenced from C:\FWH\SAMPLES\FIVEFORM.OBJ
* Linking errors *
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: First steps

Postby Antonio Linares » Thu Jun 27, 2013 4:00 am

James,

FWH function Execute() is only available for Harbour, as xHarbour does not support it. So please add a dummy function Execute()

Same applied to SetClsHandle() though I am afraid there is no workaround here. Just add a dummy function and see how it behaves, thanks
regards, saludos

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

Re: First steps

Postby James Bott » Thu Jun 27, 2013 1:20 pm

Well, I can get it to compile under xHarbour but it hangs.

Perhaps someone can send me a copy of the Harbour compiled fiveform.exe?

Regards,
James
jbott at compuserve dot com
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests