Page 1 of 1

Form Design Question

Posted: Mon Sep 20, 2021 11:24 pm
by sbatson01
Hi, I hope someone can point me in the right direction.

I'm seriously considering purchasing PureBasic, but need to know what to expect and the best ways to take advantage of it before I do.

I come from a VB 6 and Delphi Background, though it's been many years since I programmed in anything.

I normally like to layout my forms, setup event handlers using the GUI and then add my specific code after the basic layout is complete. In VB and Delphi, you could easily do this. Everything I see for PureBasic in terms creating forms, controls, etc. seems to be code based. Is there anything that focuses on using the GUI as much as possible including adding event handlers ready for the code to be added?

For example, in VB I could click on an object, say a button, and then the event handler opened up letting my input my code. Then if I wanted the button to do something like updating the caption on another object, I could just do something like objectname.caption="New Text"

I'd really like to see a video or some great examples of doing this type of thing.

Re: Form Design Question

Posted: Mon Sep 20, 2021 11:58 pm
by Mijikai
Im probably the wrong person to answer since my programs rarely have any forms.
Anyway i think that PB has a nice form designer that i personally found useful especially at the beginning.

Here is a video i found maybe its helpful:
https://www.youtube.com/watch?v=Y9Mdt93F6Q4

Re: Form Design Question

Posted: Tue Sep 21, 2021 12:23 am
by sbatson01
Thanks, I'll check it out.

Re: Form Design Question

Posted: Tue Sep 21, 2021 1:34 am
by mk-soft
The FormDesigner is a good tool for creating individual windows. I don't find the event management so well done and write it myself.
Unfortunately, it doesn't work as directly as with VB6, simply with a click. But it shouldn't be a problem once you know how to handle the event management in Purebasic.

For lazy people like me, I have written a RAD tool that creates the entire required code from one or more form file(s) (*.pbf). See signature EventDesigner

Re: Form Design Question

Posted: Tue Sep 21, 2021 6:48 am
by Joris
Maybe you can give this a try :
viewtopic.php?f=27&t=76211

I stopped working on this...

Re: Form Design Question

Posted: Tue Sep 21, 2021 7:20 pm
by Caronte3D
The integrated form designer is enough, but a bit outdated.
For me, this new (not free but cheap) form designer is the most friendly:
viewtopic.php?f=27&t=74711

Re: Form Design Question

Posted: Tue Sep 21, 2021 7:30 pm
by sbatson01
It says Windows Only, I'm assuming the final code generated could be copied to the MacOS and Linux versions for recompile?

Re: Form Design Question

Posted: Tue Sep 21, 2021 8:47 pm
by AZJIO
Making buttons is the easiest in the program code, I don't even need FormDesigner for this. In fact, it only gives me the coordinates. I can take FormDesigner from any programming language (even my "Creation Gui") to create a form and copy the coordinates.
I wanted to say that the creation of the algorithm of the program is done in days, months and years, and the creation of a button for the algorithm is done within 10 seconds.

Re: Form Design Question

Posted: Wed Sep 22, 2021 1:12 am
by ChrisR
sbatson01 wrote: Tue Sep 21, 2021 7:30 pm It says Windows Only, I'm assuming the final code generated could be copied to the MacOS and Linux versions for recompile?
Yes, this Designer works only under Windows but the generated code is 100% compatible with Linux or MacOS, ready to be recompiled.
Except a few Windows control styles that should not be selected to be cross-platform. They are well marked in the constants list for this, they are at the bottom and they start with a # (ex: #BS_Bottom, #BS_Top)