Page 1 of 1

SetWindowcolor

Posted: Mon Apr 09, 2018 5:50 pm
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

Re: SetWindowcolor

Posted: Mon Apr 09, 2018 6:05 pm
by uwekel
I can confirm this. With subsystem "gtk2" it works, but not so with default GTK3.

Re: SetWindowcolor

Posted: Mon Apr 09, 2018 6:59 pm
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

Re: SetWindowcolor

Posted: Tue Apr 10, 2018 4:02 pm
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 ;-)

Re: SetWindowcolor

Posted: Tue Apr 10, 2018 5:02 pm
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

Re: SetWindowcolor

Posted: Tue Feb 19, 2019 2:23 pm
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

Re: SetWindowcolor

Posted: Tue Feb 19, 2019 6:59 pm
by mk-soft
GTK3 Workaround...

Link: viewtopic.php?f=15&t=71992