Search found 15 matches

by RBart
Tue Oct 21, 2025 6:54 am
Forum: Coding Questions
Topic: How to open and reopen a window from a first window?
Replies: 12
Views: 1052

Re: How to open and reopen a window from a first window?

@TI-994A Thank you for sharing this approach. It makes the code allot smoother. And it keeps the windows separated. Just what I was looking for.
Greetings
Rudi
by RBart
Mon Oct 20, 2025 4:11 pm
Forum: Coding Questions
Topic: How to open and reopen a window from a first window?
Replies: 12
Views: 1052

Re: How to open and reopen a window from a first window?

Thanks Chris
I see it now.
That way the procedure (s) can be part of the file of a 'window' file. And be added to the application with a call and an include. That will keep the main event loop kind of short. And everything for each window can still be kept together in separate files. And even be ...
by RBart
Mon Oct 20, 2025 2:47 pm
Forum: Coding Questions
Topic: How to open and reopen a window from a first window?
Replies: 12
Views: 1052

Re: How to open and reopen a window from a first window?



If I want to open the second window from the menu. It won't open. If I close the already opened window, then it will open and close normally. I can open the windows but not have them open at the same time. Is this because the first window is still in this event loop. But then the main window is ...
by RBart
Mon Oct 20, 2025 12:36 pm
Forum: Coding Questions
Topic: How to open and reopen a window from a first window?
Replies: 12
Views: 1052

Re: How to open and reopen a window from a first window?


In your 2 OpenSubWindow1(2), the window is closed when you click the button "Sluiten"
but you don't exit the event loop to return to the main event loop.

Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_Gadget And EventGadget() = 4
CloseWindow(#Venster2) ; Sluit het subvenster
EndIf ...
by RBart
Mon Oct 20, 2025 9:26 am
Forum: Coding Questions
Topic: How to open and reopen a window from a first window?
Replies: 12
Views: 1052

How to open and reopen a window from a first window?

Hi

I have a main window with a menu. And in two other files I have two other windows. I can open one or the other of the two windows. I can not open an other of the two extra windows. I can close the one that I opened but I can't reopen it nor the other anymore. Is there an easy way to do/ solve ...
by RBart
Mon Oct 13, 2025 12:35 pm
Forum: Raspberry PI
Topic: Default target for compiler in project?
Replies: 4
Views: 1716

Re: Default target for compiler in project?

PeDe wrote: Mon Oct 13, 2025 12:19 pm Just for your information:
If you press the Alt key, you can move a window with the mouse by clicking anywhere in the window.

Peter
Thanks Peter

That helps

Rudi
by RBart
Mon Oct 13, 2025 11:44 am
Forum: Raspberry PI
Topic: Default target for compiler in project?
Replies: 4
Views: 1716

Re: Default target for compiler in project?

I did this. But I have no way to save the compiler settings. No buttons.
But I figured it out. I work on a 13 inch screen (actually an android tablet through videocapturecard and usb camera app) and the default resolution 1920 x 1080 makes every thing to small to work with. 1280 x 720 is just fine ...
by RBart
Mon Oct 13, 2025 8:51 am
Forum: Raspberry PI
Topic: Default target for compiler in project?
Replies: 4
Views: 1716

Default target for compiler in project?

Hi

I wanted to use a project but I cannot save the settings for the main source file in the compiler options. I can edit but i do not see any button or option to save the changes? When I close the settings ar not saved. So I get an error every time. I am on a Rasberry Pi 5 running Raspberry Pi OS ...
by RBart
Sat May 24, 2025 3:45 pm
Forum: The PureBasic Form Designer
Topic: OpenNameWindow() not working
Replies: 8
Views: 2228

Re: OpenNameWindow() not working


You must change the name of the variable or of the gadgets. Then you don't have to search and replace.
I also don't like the setting that #PB_Any is used. I prefer to work with constants
The global settings for form can be found in the Preferences menu.

Maybe you should not start with the Form ...
by RBart
Sat May 24, 2025 2:59 pm
Forum: The PureBasic Form Designer
Topic: OpenNameWindow() not working
Replies: 8
Views: 2228

Re: OpenNameWindow() not working

To change the name in the code can be done by changing it in the Properties under Variable
by RBart
Sat May 24, 2025 1:25 pm
Forum: The PureBasic Form Designer
Topic: OpenNameWindow() not working
Replies: 8
Views: 2228

Re: OpenNameWindow() not working

got the second form working too.
You need to change all the naming in the code or use the automatic generated names in the code. Would be nice if the name of the file was used when automatic generating the code file for a form.

Find/Replace speeds up de change of default naming to more reasonable ...
by RBart
Sat May 24, 2025 12:51 pm
Forum: The PureBasic Form Designer
Topic: OpenNameWindow() not working
Replies: 8
Views: 2228

Re: OpenNameWindow() not working

ok. I figured it out, the name of the file is different from the dimensioned name in the code:
XIncludeFile "MainWindow.pbf" ; Include the first window definition
; XIncludeFile "DateWindow.pbf" ; Include the second window definition

OpenWindow_0() ; Open the first window. This procedure name is ...
by RBart
Sat May 24, 2025 12:39 pm
Forum: The PureBasic Form Designer
Topic: OpenNameWindow() not working
Replies: 8
Views: 2228

Re: OpenNameWindow() not working

changed line 4 to: OpenWindow_0() ; Open the first window. This procedure name is always 'Open' followed by the window name
Error message is gone but form is not visible.
by RBart
Sat May 24, 2025 12:35 pm
Forum: The PureBasic Form Designer
Topic: OpenNameWindow() not working
Replies: 8
Views: 2228

Re: OpenNameWindow() not working

;
; This code is automatically generated by the Form Designer.
; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled.
; Event procedures need to be put in another source file.
;

Global Window_0

Global Button_0


Procedure ...
by RBart
Sat May 24, 2025 12:01 pm
Forum: The PureBasic Form Designer
Topic: OpenNameWindow() not working
Replies: 8
Views: 2228

OpenNameWindow() not working

Hi,

I am trying out PureBasic.
So I want to work with multiple forms.
I created a project and added two files, Main.pb and a MainWindow.pbf just like the example.
The second form is not created yet so I commented it out. I would think that by running the Main.pb the form MainWindow.pbf would open ...