Page 1 of 1

What is the difference between Windows and Dialogs

Posted: Fri Oct 04, 2019 5:10 pm
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!

Re: What is the difference between Windows and Dialogs

Posted: Fri Oct 04, 2019 9:40 pm
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