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
---
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"
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