Page 1 of 1

FrameGadget backcolor problem ...

Posted: Fri Jan 13, 2023 2:30 pm
by marc_256
[PB 5.73 x64 - Win 10 pro x64]

Can this be a "FrameGadget" bug ?

See post here ...
https://www.purebasic.fr/english/viewt ... p?t=80408

Code: Select all

;--------------------------------------------------------------------------------------------------
;- TEST PROGRAM FRAMEGADGET
;--------------------------------------------------------------------------------------------------
EnableExplicit

;--------------------------------------------------------------------------------------------------
Declare CreateWindow()

;--------------------------------------------------------------------------------------------------
	CreateWindow()

	Repeat
		Delay(10)
	Until WaitWindowEvent() = #PB_Event_CloseWindow

	End

;--------------------------------------------------------------------------------------------------
Procedure CreateWindow()
	If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
		SetWindowColor (0, $004000)

		FrameGadget(3, 10, 190, 300, 50, "", #PB_Frame_Flat)

	EndIf

EndProcedure

;--------------------------------------------------------------------------------------------------


Thanks,
marco

Re: FrameGadget backcolor problem ...

Posted: Fri Jan 13, 2023 10:45 pm
by jacdelad
Didn't we just talk about this some days ago in another thread?

Re: FrameGadget backcolor problem ...

Posted: Sat Jan 28, 2023 5:21 pm
by Fred
The FrameGadget() isn't transparent on Windows, it can be a feature request.

Re: FrameGadget backcolor problem ...

Posted: Sat Jan 28, 2023 11:16 pm
by Paul
Fred wrote: Sat Jan 28, 2023 5:21 pm The FrameGadget() isn't transparent on Windows, it can be a feature request.
Then it's a bug since there are different results based on where the SetWindowColor() is placed...

Frame is solid (no background Window color) until Window is dragged off the screen and back.

Code: Select all

If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
	SetWindowColor (0, $004000)
	FrameGadget(3, 10, 190, 300, 50, "", #PB_Frame_Flat)
EndIf
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
Frame is transparent and lets Window background color through.

Code: Select all

If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
	FrameGadget(3, 10, 190, 300, 50, "", #PB_Frame_Flat)
	SetWindowColor (0, $004000)
EndIf
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow


Also, if Windows is created invisible and then you make it visible (forcing Window to be redrawn like when Window is dragged off the screen and back) then SetWindowColor can be set first

Code: Select all

If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered|#PB_Window_Invisible)
	SetWindowColor (0, $004000)
	FrameGadget(3, 10, 190, 300, 50, "", #PB_Frame_Flat)
	HideWindow(0,0)
EndIf
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow

Re: FrameGadget backcolor problem ...

Posted: Tue Jan 31, 2023 1:14 am
by marc_256
Sorry Fred,

If you can read my post here
viewtopic.php?p=593361#p593361

This works very well in previous versions of PB ... till PB5.72 x64
And not on PB 5.73 LTS x64

I do not understand your answer here !!!

Marc