this is a different story, thank you very much, now all I have to do is find something for Linux
Procedure IsChildWindow( child, parent )
CompilerIf #PB_Compiler_OS = #PB_OS_MacOS
If CocoaMessage( 0, child, "parentWindow" ) = parent
ProcedureReturn #True
EndIf
CompilerElseIf #PB_Compiler_OS ...
Search found 1024 matches
- Tue Jan 20, 2026 9:57 am
- Forum: Coding Questions
- Topic: child window
- Replies: 6
- Views: 299
- Tue Jan 20, 2026 9:00 am
- Forum: Coding Questions
- Topic: child window
- Replies: 6
- Views: 299
Re: child window
first of all, thank you for responding. I think I asked the wrong question first. Now, as for the code, it doesn't return anything useful in this case.
If OpenWindow(1, 100, 200, 195, 260, "1", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
OpenWindow(2, 200, 200 ...
If OpenWindow(1, 100, 200, 195, 260, "1", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
OpenWindow(2, 200, 200 ...
- Mon Jan 19, 2026 8:36 pm
- Forum: Coding Questions
- Topic: child window
- Replies: 6
- Views: 299
child window
If OpenWindow(1, 100, 200, 195, 260, "1", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
OpenWindow(2, 300, 300, 195, 260, "2", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget, WindowID(1))
handle = WindowID(2)
; handle = WindowID(1 ...
OpenWindow(2, 300, 300, 195, 260, "2", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget, WindowID(1))
handle = WindowID(2)
; handle = WindowID(1 ...
- Sat Nov 15, 2025 9:59 am
- Forum: Off Topic
- Topic: Free, Opensource…
- Replies: 19
- Views: 3547
Re: Free, Opensource…
What are you talking about, kid?)))
- Sun Nov 09, 2025 5:34 pm
- Forum: Coding Questions
- Topic: Hex Color values reverse the Red and Blue
- Replies: 6
- Views: 755
Re: Hex Color values reverse the Red and Blue
Inside your program, no one will see how you wrote the color code. You already know about this problem and always set the color correctly. If you read the color from an ini file, simply flip it when reading:
ColorValidate()
Procedure RGBtoBGR(c)
; ProcedureReturn RGB(Blue(c), Green(c), Red(c ...
- Sun Nov 09, 2025 9:18 am
- Forum: Coding Questions
- Topic: Turn off Canvas Events during a MessageRequester() is open
- Replies: 7
- Views: 941
Re: Turn off Canvas Events during a MessageRequester() is open
In fact, this is the correct solution. Use the DisableWindow( ) function. As for the events, they should have worked until I enabled DisableWindow( )
- Thu Nov 06, 2025 9:13 pm
- Forum: Coding Questions
- Topic: Add transparency to color
- Replies: 11
- Views: 2027
Re: Add transparency to color
So this was supposed to work?
Global BackColor.l = RGBA(255, 0, 255, 150)
; Make an image with a pink background (we want the pink color to be transparent)
CreateImage(0, 256, 256, 32, BackColor)
; Put a red circle on it
StartDrawing(ImageOutput(0))
FrontColor(RGB(255, 0, 0))
BackColor(BackColor ...
Global BackColor.l = RGBA(255, 0, 255, 150)
; Make an image with a pink background (we want the pink color to be transparent)
CreateImage(0, 256, 256, 32, BackColor)
; Put a red circle on it
StartDrawing(ImageOutput(0))
FrontColor(RGB(255, 0, 0))
BackColor(BackColor ...
- Wed Nov 05, 2025 8:39 pm
- Forum: Linux
- Topic: mouse wheel
- Replies: 3
- Views: 1465
Re: mouse wheel
Hi mk-soft , thank you for sending it. Turned out the problem was that the container didn't work without the flag.
EnableExplicit
ImportC ""
gdk_event_get_scroll_deltas(*Event, *delta_x, *delta_y)
EndImport
Structure GdkEventScrollEx Extends GdkEventScroll
deltaX.d
deltaY.d
is_stop.l ...
EnableExplicit
ImportC ""
gdk_event_get_scroll_deltas(*Event, *delta_x, *delta_y)
EndImport
Structure GdkEventScrollEx Extends GdkEventScroll
deltaX.d
deltaY.d
is_stop.l ...
- Tue Nov 04, 2025 10:59 pm
- Forum: Linux
- Topic: mouse wheel
- Replies: 3
- Views: 1465
mouse wheel
Can you help me? Why is this not working? That is, delta(x&y) equals zero.
EnableExplicit
ImportC ""
gdk_event_get_scroll_deltas(*Event, *delta_x, *delta_y)
EndImport
Procedure signal_event( *self, *event.gdkeventscroll, user_data )
Protected deltaX.d, deltaY.d
If *event\type = #GDK_SCROLL ...
EnableExplicit
ImportC ""
gdk_event_get_scroll_deltas(*Event, *delta_x, *delta_y)
EndImport
Procedure signal_event( *self, *event.gdkeventscroll, user_data )
Protected deltaX.d, deltaY.d
If *event\type = #GDK_SCROLL ...
- Wed Oct 29, 2025 11:21 am
- Forum: Coding Questions
- Topic: $FF0000FF <> RGBA(255, 0, 0, 255) .... why?
- Replies: 12
- Views: 1195
Re: $FF0000FF <> RGBA(255, 0, 0, 255) .... why?
The problem I think is in the return type. [.i .l]
He also tormented me a lot.
Oops I'm late it turns out
He also tormented me a lot.
Oops I'm late it turns out
- Tue Oct 14, 2025 5:44 am
- Forum: Coding Questions
- Topic: canvas lost focus
- Replies: 5
- Views: 941
Re: canvas lost focus
My problem is visible immediately after compiling the code.BarryG wrote: Thu Oct 02, 2025 12:07 pm What if he's changing the focus to another gadget by clicking with the mouse?
- Tue Oct 14, 2025 5:42 am
- Forum: Coding Questions
- Topic: canvas lost focus
- Replies: 5
- Views: 941
Re: canvas lost focus
Maybe it should, but that's not the point.infratec wrote: Thu Oct 02, 2025 11:46 am Don't you needfor keyboard stuff?Code: Select all
#PB_Canvas_Keyboard
The point is that in Mac OS, an infinite loop starts, whereas in Windows, there is no such thing.
- Tue Oct 14, 2025 5:36 am
- Forum: Coding Questions
- Topic: child window
- Replies: 1
- Views: 406
child window
in mac OS
When closing the main window, why doesn't the child window close like in Windows? This is why there's no visible window and a warning that says "at least one window must be open."
If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget ...
When closing the main window, why doesn't the child window close like in Windows? This is why there's no visible window and a warning that says "at least one window must be open."
If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget ...
- Thu Oct 02, 2025 8:48 am
- Forum: Coding Questions
- Topic: canvas lost focus
- Replies: 5
- Views: 941
canvas lost focus
in mac os is this bug?
Procedure lostfocus( )
Debug "lostfocus"
SetActiveGadget( - 1 )
EndProcedure
OpenWindow(1, 0, 0, 320, 400, "bug", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(1, 10, 10, 300, 300, #PB_Canvas_DrawFocus )
BindGadgetEvent(1, @lostfocus( ), #PB_EventType ...
Procedure lostfocus( )
Debug "lostfocus"
SetActiveGadget( - 1 )
EndProcedure
OpenWindow(1, 0, 0, 320, 400, "bug", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(1, 10, 10, 300, 300, #PB_Canvas_DrawFocus )
BindGadgetEvent(1, @lostfocus( ), #PB_EventType ...
- Thu Mar 27, 2025 7:26 pm
- Forum: Coding Questions
- Topic: [done] RunProgram whis text
- Replies: 24
- Views: 3640
Re: [done] RunProgram whis text
I would like to do the same for Linux and macos. How do I do this?