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

by elriba Fri Oct 04, 2019 5:10 pm

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: 625
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

Re: What is the difference between Windows and Dialogs

by Peter Fri Oct 04, 2019 9:40 pm

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/viewtopic.php?f=27&t=70386
Return to Coding Questions

Who is online

Users browsing this forum: No registered users and 2 guests