Form Designer vs the Rest

You need some new stunning features ? Tell us here.
User avatar
susan
New User
New User
Posts: 7
Joined: Mon Aug 08, 2022 4:06 am

Form Designer vs the Rest

Post by susan »

I have an idea for a program with a main window and a few pop-up windows, and I am planning to make it with PureBasic. I am reading all I have time for and have watched some tutorials on YouTube.

But there is something that is distracting me. It's about making the windows.

My impression is that if from the start I learn to use the Form Designer in the IDE then I won't know what I am missing, and it will do the job.

But then I read and watch about IceDesign and PureVision and think that I should ignore Form Designer and start with one of them instead? (And just a moment ago I found out about Dialog Design0R too!)

And then I wonder if I should ignore them all including the Form Designer, and do all my (relatively simple) windows in code only and not be tied to any visual designer. Does anybody prefer to do it that way?

Not looking for somebody to tell me what to do, but interested in any thoughts around the whole issue of how you do your UI in PureBasic.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2139
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Form Designer vs the Rest

Post by Andre »

Beside the mentioned three dialog designers (which are probably more powerful than the included one) you can of course do the window / gadget stuff by hand (for which also an topic included in the help file is available: https://www.purebasic.com/documentation ... g_gui.html), or use the Dialog library commands (docs: https://www.purebasic.com/documentation ... index.html). For the dialog library is also a powerful 'Dynamic Dialogs' module to ease the creation of GUI's available: viewtopic.php?t=65330

Just some ideas, there are several ways to go :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
mk-soft
Always Here
Always Here
Posts: 6224
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Form Designer vs the Rest

Post by mk-soft »

For small projects where I only need a window and a dialogue window I write them without designer.
Otherwise I like to take the internal FormDesigner even if it still has some weaknesses (we all work on it).
However, without "New gadget with #PB_Any by default" because I find constants better and
Without "Generate event procedures" because I create them myself and have a tool to automatically create all required files and procedures.
See Preferences -> Form.

For the creation of all required files with all procedures, see Signature EventDesigner.
But only use when you have successfully understood and created the event loop yourself :!:

P.S.
The FormDesigner of PB v6.21 still has a bug. You can download the patch here
Link: PureBasic IDE Patch
Last edited by mk-soft on Sun Aug 10, 2025 1:28 pm, edited 1 time in total.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
spikey
Enthusiast
Enthusiast
Posts: 758
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: Form Designer vs the Rest

Post by spikey »

susan wrote: Sun Aug 10, 2025 12:06 pm My impression is that if from the start I learn to use the Form Designer in the IDE then I won't know what I am missing, and it will do the job.
Not really. PureBasic isn't a "very high" level language, it doesn't hide much away from the programmer or add huge sections of concealed functionality in its libraries. The only thing you don't really see represented in the code is the garbage collection incorporated in the libraries, however the help articles usually document what will and won't be tidied up by each library.

The form designer creates PureBasic code which creates the window you've drawn so you can still see what's going on by switching to the code view. The only thing it conceals is the event loop that gets created automatically and invisibly when you test compile/run a form design on its own. You'll have to construct an event loop when you incorporate the forms into your program so you'll still become familiar with this process just via a slightly different route.
susan wrote: Sun Aug 10, 2025 12:06 pm But then I read and watch about IceDesign and PureVision and think that I should ignore Form Designer and start with one of them instead? (And just a moment ago I found out about Dialog Design0R too!)
Each have their own advantages and disadvantages. The built in designer you get at no extra charge, both ICE or PureVision cost, but also add additional features. None of these supports XML dialog format at present so if you intend to go down that route you're automatically tied to hand construction or Dialog Design0R.

If you're learning and/or on a budget you can stick with the built-in designer. If you aren't worried about budget too much both ICE and PureVision are highly regarded by their fans I think.

The XML dialog libary is relatively new so most examples here on the forum don't use it. This means a smaller learning sample to read up on. However several people here use it in real projects, so it shouldn't be an issue getting help for specific questions or problems you might run into.
susan wrote: Sun Aug 10, 2025 12:06 pm And then I wonder if I should ignore them all including the Form Designer, and do all my (relatively simple) windows in code only and not be tied to any visual designer. Does anybody prefer to do it that way?
Me, although I still don't create windows completely by hand because a visual tool is very useful for working out good layouts.

I use Structures to marshal my window and gadget references, rather than separate variables. The use of lots of Global variables gets cumbersome quickly in big programs. I use "Event Binding" for event procedures, and I often want multiple instances of individual windows too. None of the designers support these features directly as far as I am aware.

I use the Form Designer to draft my layouts but then I redraft the code so it fits my coding standards before incorporating into an application.
User avatar
moulder61
Enthusiast
Enthusiast
Posts: 192
Joined: Sun Sep 19, 2021 6:16 pm
Location: U.K.

Re: Form Designer vs the Rest

Post by moulder61 »

Hi Susan,

As very much a non expert in the use of PB and programming in general, but someone who likes to try different things out, I have dabbled with the built in form designer a bit here and there.

As nobody else has mentioned it yet, be aware that if you do then modify the code it generates and then run it in the form designer again, it will undo all your work! Well, it did the last time I tried it anyway!

For example, it does tend to name gadgets things like: gadget_1, copy_of_gadget_1, copy_of_copy_of_gadget_1 if you copy gadgets rather than create them all individually. So when you start renaming them to something more readable it will change them back.

I'd recommend testing that out first, just to make sure. That might not be the case anymore?

As someone else mentioned, it's good for simple stuff or to get you started.

I can't speak for the other form designers mentioned as I only use Linux and believe they are all M$ Windows based applications.

Moulder.
"If it ain't broke, fix it until it is!

This message is brought to you thanks to SenselessComments.com

My PB stuff for Linux: "https://u.pcloud.link/publink/show?code ... z3MR0T3jyV
miso
Enthusiast
Enthusiast
Posts: 455
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: Form Designer vs the Rest

Post by miso »

My windows GUI programs are so simple projects, that for me was always faster and more convenient just to program/make manually the windows and gadgets.
User avatar
susan
New User
New User
Posts: 7
Joined: Mon Aug 08, 2022 4:06 am

Re: Form Designer vs the Rest

Post by susan »

Appreciate the comments and links which all give me good starting points to help me decide, thank you. Right now, I am thinking of starting with the Form Designer and just seeing how it goes! After seeing comments in the forum and content elsewhere, I was wondering if that would be a poor choice, but now the Form Designer seems "good enough" for my plans.

But I probably won't know for sure, until I make a start! :)
Post Reply