SetWindowcolor

Linux specific forum
loulou2522
Enthusiast
Enthusiast
Posts: 495
Joined: Tue Oct 14, 2014 12:09 pm

SetWindowcolor

Post by loulou2522 »

Under Linux Ubuntu 17.10 with PB 5.62 X64
Setwindowcolor

seems not working
Has someone have had the same problem and how to bypass
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: SetWindowcolor

Post by uwekel »

I can confirm this. With subsystem "gtk2" it works, but not so with default GTK3.
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
loulou2522
Enthusiast
Enthusiast
Posts: 495
Joined: Tue Oct 14, 2014 12:09 pm

Re: SetWindowcolor

Post by loulou2522 »

uwekel wrote:I can confirm this. With subsystem "gtk2" it works, but not so with default GTK3.
Can you Know how to bypass this problem ? I am new to linuk
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: SetWindowcolor

Post by uwekel »

In the Compiler-Options dialog you have to enter "gtk2" in the Library Subsystem field. The the GTK2 widget set will be used. Hard setting colors in GTK3 is more complex, so i guess Fred has left it out ;-)
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
loulou2522
Enthusiast
Enthusiast
Posts: 495
Joined: Tue Oct 14, 2014 12:09 pm

Re: SetWindowcolor

Post by loulou2522 »

uwekel wrote:In the Compiler-Options dialog you have to enter "gtk2" in the Library Subsystem field. The the GTK2 widget set will be used. Hard setting colors in GTK3 is more complex, so i guess Fred has left it out ;-)
Many thanks that's works perfectly
User avatar
Borstensohn
User
User
Posts: 11
Joined: Sun Jun 05, 2005 9:45 pm

Re: SetWindowcolor

Post by Borstensohn »

You could use a ContainerGadget instead, which wraps around all the other gadgets, and set a backgorund color for it. This works perfectly with GTK3 (which looks much prettier than GTK2). In this case you have to leave the field for the Lbrary Subsystem in the Compiler Options blank. At least this works with PureBasic 5.70 LTS (x64) on Xubuntu.

Code: Select all

OpenWindow(#Window, x, y, InnerWidth, InnerHeight, Title$ [, Flags [, ParentWindowID]])
    Enumeration
        […]
        #cntContainer
    EndEnumeration

    […]

    ContainerGadget(#cntContainer, 0, 0, 432, 504, #PB_Container_Raised)
    SetGadgetColor(#cntContainer, #PB_Gadget_BackColor, RGB(213,255,255))
        [other gadgets]
    CloseGadgetList()

       […]
EndIf ;OpenWindow
ON ERROR GOTO BED
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: SetWindowcolor

Post by mk-soft »

GTK3 Workaround...

Link: viewtopic.php?f=15&t=71992
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply