FormDesigner for DUMMIES

Alles rund um Editoren, visuelle Entwicklungshilfen und Form-Designer

Moderator: Moderatoren

Antworten
maxz
Rookie
Rookie
Beiträge: 6
Registriert: Di, 20. Jul 2021 17:47
Wohnort: Turin - ITALY

FormDesigner for DUMMIES

Beitrag von maxz »

Is there a volunteer who is kind enough to write a small tutorial on using the FormDesigner editor to create screens and integrate them into programs?
I'd like to leave hybrid mode and switch to GUI mode in xbase but I don't know where to start.

I have always created programs using help libraries such as Express or Topdown but I would like to understand if the FormEditor could speed up the realization of the screens

this is to be able to evaluate the purchase of xbase 2.0.
I am currently using 1.9

thanks in advance if someone can give me help in this direction =D> =D>
georg
Der Entwickler von "Deep Thought"
Der Entwickler von "Deep Thought"
Beiträge: 2754
Registriert: Fr, 08. Feb 2008 21:29
Hat sich bedankt: 51 Mal
Danksagung erhalten: 5 Mal

Re: FormDesigner for DUMMIES

Beitrag von georg »

Hello, Max -

the FormDesigner is (from my point of view) just for starters. After I got the idea behind the way the controls are working, I've integrated them into my program code. One can also write code that populates a dialogue "on the fly" or based on the structure of a dbf file or SQL table.

For an easy start, create a dialogue with a few contols (i.e. Xbase parts), create the source code, compile and run under the debugger to get an idea what is going on.
Liebe Grüsse aus der Eifel,

Georg S. Lorrig
Redakteur der Wiki des Deutschprachigen Xbase-Entwickler e.V.
maxz
Rookie
Rookie
Beiträge: 6
Registriert: Di, 20. Jul 2021 17:47
Wohnort: Turin - ITALY

Re: FormDesigner for DUMMIES

Beitrag von maxz »

but you can not create even a browse in a simple way, for example
Dominik Krebs
Rekursionen-Architekt
Rekursionen-Architekt
Beiträge: 102
Registriert: Mo, 15. Apr 2019 16:19
Hat sich bedankt: 1 Mal
Danksagung erhalten: 3 Mal

Re: FormDesigner for DUMMIES

Beitrag von Dominik Krebs »

Hello Max,
try to check out the samples of Xbase++ in your Documents folder.
There are lot of samples for GUI mode.

In my Applications I have a prg with written templates by myself.

I copy and paste if I need a new window, Browse or something.
Gruß Dominik
Benutzeravatar
AUGE_OHR
Marvin
Marvin
Beiträge: 12661
Registriert: Do, 16. Mär 2006 7:55
Wohnort: Hamburg
Hat sich bedankt: 5 Mal
Danksagung erhalten: 18 Mal

Re: FormDesigner for DUMMIES

Beitrag von AUGE_OHR »

hi,

you can use XppFD.EXE to create a Form and put (real) Windows Controls on it.
XbpBrowse() is NOT a Windows Control ( self made by Alaska ) so you can not drop it
but you can use a XbpStatic() as "place holder"

---

i recommend to use XppFD.EXE to learn "Datalink" Syntax.
you must "store" Data into Control and "replace" Value from Control back to DBF.

you can use XppFD.EXE Assistant to take a DBF and drop FIELDs to Form and generate "Class Code"

you will get 2 x PRG Files : _MyFile.PRG and MyFile.PRG

Alaska OOP Concept use "New()" in _MyFile.PRG and "Create()" in MyFile.PRG

File begin with "_" can be change by XppFD.EXE ( e.g. add new FIELDs ) so don´t touch it without XppFD.EXE
File without "_" is where you write your Code

Note ! all Files generate by XppFD.EXE have "_NewForm" so you have to rename them

Attach Sample with DBF and *.XFF
DataLink.zip
(6.23 KiB) 20-mal heruntergeladen
---

Windows Apps react on Event e.g. when press Button.

so when generate Code with XppFD.EXE it will "do nothing"
you have to "fill" Codeblock-Slot with "Action"

as i say i recommend to use "Class Code" so you have to learn Syntax of OOP

in "_" *.PRG Sample is a XbpPushbutten() but not "Action" is "Generate"

Code: Alles auswählen

   ::PushButton1:activate := {|| NIL }
as "_" Files can be change by XppFD.EXE you must write your Code into 2nd File

Code: Alles auswählen

   ::PushButton1:activate := {|| Gather( ::editControls ), PostAppEvent( xbeP_Close ) }
---

look in Help File for XbpPushButton().
you will find "Configuration", "Live-time", "Manipulation" and "Events"

"Configuration" must be done between New() and Create()
"Manipulation" is only available at Runtime
"Events" can be "get" and "Action" can be assign in Codeblock Slot

but as Newbie you don´t know Syntax, that´s why i recommend to use XppFD.EXE
XppFD.EXE will generate "right" Syntax so you can learn Xbase++ OOP

---

:SetData() / :GetData() are the Way to use :Datalink like this

Code: Alles auswählen

     ::Testc:dataLink := {|x| IIf( PCOUNT()==0, Trim( (::TEST)->TESTC ), (::TEST)->TESTC := x ) }

also look at \Source\SYS\Blocks.prg for Scatter() / Gather() using AEval()

other Class Code Sample
\Source\samples\activex\editor\_rtf.prg
\Source\samples\activex\webbrowser\_webbrowser.prg

\Source\samples\basics\DRAGDROP\_MAINDLG.PRG
\Source\samples\basics\GuiBrow\_EBROWSE.prg
\Source\samples\basics\Xppfd\_sample2.prg
\Source\samples\solution\ShortCut\_scdemo.prg
that Code is not always generate by XppFD.EXE but show the Way how to work wit 2 x PRG Files.

p.s. it will not be better using Xbase++ v2.x and v1.9.355 will still working under Windows 11
gruss by OHR
Jimmy
Antworten