Page 1 of 1
SetGadgetColor & StringGadget: Win7 or PB-Problem?
Posted: Tue Jan 05, 2010 8:59 pm
by Marco2007
Hi,
when I color a StringGadget on Win7, it looks like this (I don`t like the white thick Lines):
XP:

Sorry, if this has already been reported/discussed....
Re: SetGadgetColor & StringGadget: Win7 or PB-Problem?
Posted: Tue Jan 05, 2010 9:04 pm
by Arctic Fox
I think it is caused by the border of the StringGadget.
Try this to create an XP-like border
Code: Select all
StringGadget(0, 5, 5, 100, 20, "StringGadget", #PB_String_BorderLess | #WS_BORDER)
Re: SetGadgetColor & StringGadget: Win7 or PB-Problem?
Posted: Tue Jan 05, 2010 9:23 pm
by Marco2007
Excellent, but the PB-Team always says, we shouldn`t mix PB- and WinApi-constants or use Winapi-constants with PB-functions iirc.
It´s not centered correctly, but I think, there will be a flag for that...
Thx

Re: SetGadgetColor & StringGadget: Win7 or PB-Problem?
Posted: Tue Jan 05, 2010 9:32 pm
by Fred
You can, but it's not officially supported if something breaks later.
Re: SetGadgetColor & StringGadget: Win7 or PB-Problem?
Posted: Tue Jan 05, 2010 9:33 pm
by Marco2007
Ok, thx, too!
Could do something native?
Re: SetGadgetColor & StringGadget: Win7 or PB-Problem?
Posted: Tue Jan 05, 2010 9:35 pm
by Arctic Fox
Marco2007 wrote:It´s not centered correctly, but I think, there will be a flag for that...
Not centered correctly?
Re: SetGadgetColor & StringGadget: Win7 or PB-Problem?
Posted: Tue Jan 05, 2010 9:38 pm
by Arctic Fox
Marco2007 wrote:Could do something native?
A rather 'quick' way
Code: Select all
OpenWindow(0, 100, 100, 300, 300, "")
ContainerGadget(0, 5, 5, 100, 20, #PB_Container_Flat)
StringGadget(1, 2, 2, 98, 18, "StringGadget", #PB_String_BorderLess)
CloseGadgetList()
SetWindowColor(0, #Green)
SetGadgetColor(0, #PB_Gadget_BackColor, #Green)
SetGadgetColor(1, #PB_Gadget_BackColor, #Green)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
End
Re: SetGadgetColor & StringGadget: Win7 or PB-Problem?
Posted: Tue Jan 05, 2010 9:44 pm
by Marco2007
very clever
Left one: #PB_String_BorderLess | #WS_BORDER (a little´bit too high)

Re: SetGadgetColor & StringGadget: Win7 or PB-Problem?
Posted: Tue Feb 16, 2010 4:57 pm
by LuaDev
the under-estimated container gadget is one of my best friends, i like to house gadgets inside them and tweak the life out of it, adding message bars to listicons, search boxes and such and add it as a custom gadget
this little string trick tho, i never thought of that