ObjectColor (Dark Mode)

Share your advanced PureBasic knowledge/code with the community.
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: ObjectColor (Dark Mode)

Post by ChrisR »

BarryG wrote: Sat Jan 28, 2023 2:07 am Does this mean I can use it on windows that are created on-the-fly now? Like for my app where the number of windows is indeterminate and are opened/closed during runtime of my app?
Yes it should work now for windows created on-the-fly.
Once the new Window is created with all its Gadgets, just call SetObjColor() again.

When calling SetObjColor(), the enumeration (PB_Object_Enumerate) is always done now and the new Window and new Gadgets are written in the map. Then put in hierarchy with the backgound colors.
When a window is closed, the window and its child gadgets are removed from the map and the brushes are also released.
Just for info, in case, I won't be home the next 3 days.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: ObjectColor (Dark Mode)

Post by BarryG »

ChrisR wrote: Sat Jan 28, 2023 2:37 amJust for info, in case, I won't be home the next 3 days.
LOL, I understand what you're getting at. I won't download/test it for a while anyway, as I have other priorities right now. Just wanted to confirm it does what I think you said, and now I know. Noted for future implementation, and many thanks for adding this new way of doing it. Appreciate it!
ShadowStorm
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Feb 14, 2017 12:07 pm

Re: ObjectColor (Dark Mode)

Post by ShadowStorm »

Hi,

Ah yes not bad at all, very very good, thank you very much ChrisR ! :D
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
firace
Addict
Addict
Posts: 899
Joined: Wed Nov 09, 2011 8:58 am

Re: ObjectColor (Dark Mode)

Post by firace »

Excellent work!

I've noticed a coloring issue with the ListIconGadget though, when resizing columns (or if the listicon is simply wider than the column set)

Image
Post Reply