Using Tget and Cuebanner

User avatar
Marc Venken
Posts: 1481
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Using Tget and Cuebanner

Post by Marc Venken »

I need to program several screens for input of data with gets.

Looking for some info I came also on Cuebanner get with its inline, infield,... syntax. They are all in Tget but I wonder at this point and versions is Tget the correct control to use ?

Since it is only a couple of screens I will not use RC or Borland. Just coded gets. Do You have a nice looking dialog with gets coded ? I would like to see the extra code from some of these gets.

Thanks
Marc Venken
Using: FWH 23.08 with Harbour
User avatar
Silvio.Falconi
Posts: 7104
Joined: Thu Oct 18, 2012 7:17 pm

Re: Using Tget and Cuebanner

Post by Silvio.Falconi »

for a long time since I use harbour instead of clipper I have always used the source screenshots @x,y because the RC eats up a lot of memory, using the rc file only for the images.

I arrived at a personal technique using simply nRow:=10, ncol=5 and nLine spacing =30 obviously nLine spacing changes depending on the fonts used. what do you have in mind in particular? do you have images from which to copy the screenshots?
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
Marc Venken
Posts: 1481
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Using Tget and Cuebanner

Post by Marc Venken »

Sylvio,

Today I came up with a post from you :

https://forums.fivetechsupport.com/view ... =3&t=35098


I think to start building like the first picture but I don't need the animated/moving boxes. AS I said, pretty simple ))

And like you say the basic code. Works ok.
Marc Venken
Using: FWH 23.08 with Harbour
User avatar
Marc Venken
Posts: 1481
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Using Tget and Cuebanner

Post by Marc Venken »

In Tget there is the methods for coloring the inside of a Tget.

@ 100,05 GET oGet2 VAR oKlant:Naam_1 OF oFld2:aDialogs[FOLDERDOC_KASSA] COLOR "N/W*" ;
CUEBANNER "Name" PIXEL BOTTOMBORDER ;
INFIELD;
INCLRTXT CLR_DARKGRAY;
INCLRBORDER CLR_DARKGRAY;
INCLRLINE CLR_HRED;
DYNAMIC;
GROUP

In the info folowing message is included :

All color values included in the clauses can be codeblocks

https://forums.fivetechsupport.com/view ... =3&t=36283

Can someone please explain why this is usefull and give also a sample code of using it ? Maybe it will help me with a design.
Marc Venken
Using: FWH 23.08 with Harbour
User avatar
Antonio Linares
Site Admin
Posts: 42252
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Using Tget and Cuebanner

Post by Antonio Linares »

Dear Marc,

Could you provide a screenshot of the dialogbox design you are looking for ?

many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Marc Venken
Posts: 1481
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Using Tget and Cuebanner

Post by Marc Venken »

Antonio,

I think like this is nice. Bright and nice Icons.

I was playing with Cuebanner and the Infield code, but most likely the Normal Tget have more options in designing.

I will have to look fore some sample prg's where the Tget options are used for bitmap, colors and designing method/data

Image
Marc Venken
Using: FWH 23.08 with Harbour
User avatar
Marc Venken
Posts: 1481
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Using Tget and Cuebanner

Post by Marc Venken »

In the source, in order to find the options I can see folowing prg's

autoget
fget
mget
tget

fget and tget are the big owns.

I do need to use the tget right ?
Marc Venken
Using: FWH 23.08 with Harbour
User avatar
Antonio Linares
Site Admin
Posts: 42252
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Using Tget and Cuebanner

Post by Antonio Linares »

Dear Marc,

You can provide that screenshot to chatgpt and ask it to create the RC file and the header file, unless you don't want to use RCs and want to fully build it from source code:

test.rc

Code: Select all | Expand

#include "resource.h"

IDD_CARTOLERIA_DIALOG DIALOGEX 0, 0, 400, 300
STYLE WS_CAPTION | WS_SYSMENU
CAPTION "Registry"
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "Operational Headquarters",IDC_STATIC,10,10,380,150
    LTEXT           "Code:",IDC_STATIC,20,30,40,10
    EDITTEXT        IDC_CODE,70,30,50,14,ES_AUTOHSCROLL
    
    LTEXT           "Name:",IDC_STATIC,20,50,60,10
    EDITTEXT        IDC_NAME,70,50,200,14,ES_AUTOHSCROLL

    LTEXT           "Address:",IDC_STATIC,20,70,40,10
    EDITTEXT        IDC_ADDRESS,70,70,200,14,ES_AUTOHSCROLL

    LTEXT           "ZIP Code:",IDC_STATIC,20,90,40,10
    EDITTEXT        IDC_ZIP_CODE,70,90,50,14,ES_AUTOHSCROLL

    LTEXT           "City:",IDC_STATIC,130,90,40,10
    EDITTEXT        IDC_CITY,170,90,100,14,ES_AUTOHSCROLL

    LTEXT           "Country:",IDC_STATIC,20,110,40,10
    COMBOBOX        IDC_COUNTRY,70,110,100,14,CBS_DROPDOWNLIST | WS_VSCROLL

    LTEXT           "Phone:",IDC_STATIC,20,140,50,10
    EDITTEXT        IDC_PHONE,70,140,100,14,ES_AUTOHSCROLL
    LTEXT           "Mobile:",IDC_STATIC,180,140,40,10
    EDITTEXT        IDC_MOBILE,220,140,100,14,ES_AUTOHSCROLL

    LTEXT           "Email:",IDC_STATIC,20,160,50,10
    EDITTEXT        IDC_EMAIL,70,160,150,14,ES_AUTOHSCROLL

    LTEXT           "VAT Number:",IDC_STATIC,20,180,50,10
    EDITTEXT        IDC_VAT_NUMBER,70,180,100,14,ES_AUTOHSCROLL

    PUSHBUTTON      "Add Address...",IDC_BTN_ADD_ADDRESS,250,100,120,14
    PUSHBUTTON      "Attach...",IDC_BTN_ATTACH,250,200,120,14
    PUSHBUTTON      "Documents",IDC_BTN_DOCUMENTS,250,220,120,14
    PUSHBUTTON      "Payments",IDC_BTN_PAYMENTS,250,240,120,14
END
 
resource.h

Code: Select all | Expand

#ifndef RESOURCE_H
#define RESOURCE_H

// Dialog ID
#define IDD_CARTOLERIA_DIALOG         101

// Control IDs
#define IDC_CODE                      1001
#define IDC_NAME                      1002
#define IDC_ADDRESS                   1003
#define IDC_ZIP_CODE                  1004
#define IDC_CITY                      1005
#define IDC_COUNTRY                   1006
#define IDC_PHONE                     1007
#define IDC_MOBILE                    1008
#define IDC_EMAIL                     1009
#define IDC_VAT_NUMBER                1010

#define IDC_BTN_ADD_ADDRESS           1101
#define IDC_BTN_ATTACH                1102
#define IDC_BTN_DOCUMENTS             1103
#define IDC_BTN_PAYMENTS              1104

#endif // RESOURCE_H
regards, saludos

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

Re: Using Tget and Cuebanner

Post by Antonio Linares »

We can also ask chatgpt to write the FiveWin source code for it:

test.prg

Code: Select all | Expand

#include "FiveWin.ch"
#include "resource.h"

FUNCTION Main()
   LOCAL oDlg
   LOCAL oGetCode, oGetName, oGetAddress, oGetZipCode, oGetCity
   LOCAL oCbxCountry, oGetPhone, oGetMobile, oGetEmail, oGetVAT
   LOCAL oBtnAddAddress, oBtnAttach, oBtnDocuments, oBtnPayments
   LOCAL cCode := Space(10), cName := Space(30), cAddress := Space(50)
   LOCAL cZipCode := Space(10), cCity := Space(30), cCountry := Space(20)
   LOCAL cPhone := Space(15), cMobile := Space(15), cEmail := Space(40), cVAT := Space(15)

   DEFINE DIALOG oDlg RESOURCE IDD_CARTOLERIA_DIALOG

   REDEFINE GET oGetCode VAR cCode     ID IDC_CODE OF oDlg
   REDEFINE GET oGetName VAR cName     ID IDC_NAME OF oDlg
   REDEFINE GET oGetAddress VAR cAddress  ID IDC_ADDRESS OF oDlg
   REDEFINE GET oGetZipCode VAR cZipCode  ID IDC_ZIP_CODE OF oDlg
   REDEFINE GET oGetCity VAR cCity     ID IDC_CITY OF oDlg
   REDEFINE COMBOBOX oCbxCountry VAR cCountry ID IDC_COUNTRY OF oDlg
   REDEFINE GET oGetPhone VAR cPhone    ID IDC_PHONE OF oDlg
   REDEFINE GET oGetMobile VAR cMobile   ID IDC_MOBILE OF oDlg
   REDEFINE GET oGetEmail VAR cEmail    ID IDC_EMAIL OF oDlg
   REDEFINE GET oGetVAT VAR cVAT      ID IDC_VAT_NUMBER OF oDlg

   REDEFINE BUTTON oBtnAddAddress ID IDC_BTN_ADD_ADDRESS OF oDlg ACTION MsgInfo("Add Address clicked")
   REDEFINE BUTTON oBtnAttach     ID IDC_BTN_ATTACH OF oDlg ACTION MsgInfo("Attach clicked")
   REDEFINE BUTTON oBtnDocuments  ID IDC_BTN_DOCUMENTS OF oDlg ACTION MsgInfo("Documents clicked")
   REDEFINE BUTTON oBtnPayments   ID IDC_BTN_PAYMENTS OF oDlg ACTION MsgInfo("Payments clicked")

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
regards, saludos

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

Re: Using Tget and Cuebanner

Post by Antonio Linares »

Now we can also ask it to write code using FiveWin commands without using the RC:

Code: Select all | Expand

#include "FiveWin.ch"
#include "resource.h"

FUNCTION Main()
   LOCAL oDlg
   LOCAL oGetCode, oGetName, oGetAddress, oGetZipCode, oGetCity
   LOCAL oCbxCountry, oGetPhone, oGetMobile, oGetEmail, oGetVAT
   LOCAL oBtnAddAddress, oBtnAttach, oBtnDocuments, oBtnPayments
   LOCAL cCode := Space(10), cName := Space(30), cAddress := Space(50)
   LOCAL cZipCode := Space(10), cCity := Space(30), cCountry := Space(20)
   LOCAL cPhone := Space(15), cMobile := Space(15), cEmail := Space(40), cVAT := Space(15)

   DEFINE DIALOG oDlg TITLE "Cartoleria Mazzini" FROM 0, 0 TO 25, 70 PIXEL

   @ 1, 1 SAY "Code:" OF oDlg
   @ 1, 10 GET oGetCode VAR cCode OF oDlg

   @ 2, 1 SAY "Name:" OF oDlg
   @ 2, 10 GET oGetName VAR cName OF oDlg

   @ 3, 1 SAY "Address:" OF oDlg
   @ 3, 10 GET oGetAddress VAR cAddress OF oDlg

   @ 4, 1 SAY "ZIP Code:" OF oDlg
   @ 4, 10 GET oGetZipCode VAR cZipCode OF oDlg

   @ 5, 1 SAY "City:" OF oDlg
   @ 5, 10 GET oGetCity VAR cCity OF oDlg

   @ 6, 1 SAY "Country:" OF oDlg
   @ 6, 10 COMBOBOX oCbxCountry VAR cCountry ITEMS {"Italy", "San Marino", "Other"} OF oDlg

   @ 7, 1 SAY "Phone:" OF oDlg
   @ 7, 10 GET oGetPhone VAR cPhone OF oDlg

   @ 8, 1 SAY "Mobile:" OF oDlg
   @ 8, 10 GET oGetMobile VAR cMobile OF oDlg

   @ 9, 1 SAY "Email:" OF oDlg
   @ 9, 10 GET oGetEmail VAR cEmail OF oDlg

   @ 10, 1 SAY "VAT Number:" OF oDlg
   @ 10, 10 GET oGetVAT VAR cVAT OF oDlg

   @ 12, 10 BUTTON oBtnAddAddress PROMPT "Add Address" ACTION MsgInfo("Add Address clicked") OF oDlg
   @ 12, 25 BUTTON oBtnAttach PROMPT "Attach" ACTION MsgInfo("Attach clicked") OF oDlg
   @ 13, 10 BUTTON oBtnDocuments PROMPT "Documents" ACTION MsgInfo("Documents clicked") OF oDlg
   @ 13, 25 BUTTON oBtnPayments PROMPT "Payments" ACTION MsgInfo("Payments clicked") OF oDlg

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Marc Venken
Posts: 1481
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Using Tget and Cuebanner

Post by Marc Venken »

I use ChatGtp a lot, and will try again. but Fwin code is mostly not usable.

Will give it a try ....
Marc Venken
Using: FWH 23.08 with Harbour
User avatar
Antonio Linares
Site Admin
Posts: 42252
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Using Tget and Cuebanner

Post by Antonio Linares »

You are right. The BTNBMPs have been ignored in the previous code but it is a help to start with the dialog code :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 7104
Joined: Thu Oct 18, 2012 7:17 pm

Re: Using Tget and Cuebanner

Post by Silvio.Falconi »

Marc Venken wrote:Antonio,

I think like this is nice. Bright and nice Icons.

I was playing with Cuebanner and the Infield code, but most likely the Normal Tget have more options in designing.

I will have to look fore some sample prg's where the Tget options are used for bitmap, colors and designing method/data

Image
Marc I need where you take this picture ( also the year) to make a search
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
Marc Venken
Posts: 1481
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Using Tget and Cuebanner

Post by Marc Venken »

Silvio,

This last picture is not from FWin forum, but a Software from Pictures of the NET.

Its just to have a idea. I did see some nice design from you, but when I come to one of them I will show you.

In fact, is you have 1 or 2 gets (only the code) where a lot of stuff in going on like

onchange, valid, colors, bmp's, that would help me a lot. Designing a full dialog in than a matter of small time.
Marc Venken
Using: FWH 23.08 with Harbour
User avatar
Silvio.Falconi
Posts: 7104
Joined: Thu Oct 18, 2012 7:17 pm

Re: Using Tget and Cuebanner

Post by Silvio.Falconi »

Marc Venken wrote:Silvio,

This last picture is not from FWin forum, but a Software from Pictures of the NET.

Its just to have a idea. I did see some nice design from you, but when I come to one of them I will show you.

In fact, is you have 1 or 2 gets (only the code) where a lot of stuff in going on like

onchange, valid, colors, bmp's, that would help me a lot. Designing a full dialog in than a matter of small time.
This dialog was taken from an Italian commercial application called Danea Easyfact, but I think we can remake It Easy
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
Post Reply