FrameGadget backcolor problem ...

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
marc_256
Addict
Addict
Posts: 837
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

FrameGadget backcolor problem ...

Post 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
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
User avatar
jacdelad
Addict
Addict
Posts: 1993
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: FrameGadget backcolor problem ...

Post by jacdelad »

Didn't we just talk about this some days ago in another thread?
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: FrameGadget backcolor problem ...

Post by Fred »

The FrameGadget() isn't transparent on Windows, it can be a feature request.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: FrameGadget backcolor problem ...

Post 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
Image Image
marc_256
Addict
Addict
Posts: 837
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: FrameGadget backcolor problem ...

Post 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
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Post Reply