What is the difference between Windows and Dialogs

Just starting out? Need help? Post your questions and find answers here.
elriba
Posts: 5
Joined: Fri Oct 04, 2019 4:45 pm

What is the difference between Windows and Dialogs

Post by elriba »

Hi,

I am new to SpiderBasic. I see that there are two ways to create windows: "Window"s and "Dialog"s, and I see the different syntax for each one.

Besides the difference in syntax for creating them, is there any other difference between "Window"s and "Dialog"s? Or are they just two ways of doing the same thing?

Thanks!
User avatar
Peter
Posts: 1093
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: What is the difference between Windows and Dialogs

Post by Peter »

elriba wrote:Besides the difference in syntax for creating them, is there any other difference between "Window"s and "Dialog"s?
With the classic windows (OpenWindow()) you can (must) position your gadgets using the top, left, width and height - properties.

In the dialogs, the gadgets are positioned according to a layout principle. There are different containers here (hbox, vbox, gridbox, ...) and the UI automatically adjusts to the size of the surrounding container.

This may be a little more complicated in the beginning, but has the advantage that you don't have to worry about resizing the gadgets anymore.

Greetings ... Peter

Edit: Here is a very useful tool to design Dialogs: https://www.purebasic.fr/english/viewto ... 27&t=70386
Post Reply