andlabs / ui

Platform-native GUI library for Go.
Other
8.33k stars 651 forks source link

Is there any way to add icon to my window? #261

Open ZXC741ASD852QWE963 opened 6 years ago

ZXC741ASD852QWE963 commented 6 years ago

Dear andlabs Hey pro ,this is a nice project and I'm now enjoying creating gui programs with it. But one thing I want to figure out is how to add icon to the left of title? I would be appreciate it very much if you replay me.

                                                                                                                                                Yours,        
                                                                                                                   ZXC741ASD852QWE963                                                                                                                                
Sebastien-Gutierrez commented 6 years ago

I'm also interested :-)

andlabs commented 6 years ago

Which platform(s)?

Sebastien-Gutierrez commented 6 years ago

In windows 10

andlabs commented 6 years ago

I need to write that code. I don't know if I can do this in a platform-independent way, but a quick fix for Windows is to simply use the same icon Explorer uses... but I have to figure out how it gets that icon, first.

Flagon00 commented 3 years ago

I'm also interested. One of the simplest ways to do that is just make something like this - if the program will find icon in .exe resources, then set it on title bar icon, or you can add hiding option. I tried to do that, but my cpp experience is too low right now 😑