Page 1 of 1
SetGadgetColor()
Posted: Thu Sep 19, 2013 9:57 am
by dobro
currently the syntax is:
Code: Select all
SetGadgetColor(#listview_signet, #PB_Gadget_BackColor, coul_fond)
SetGadgetColor(#listview_signet, #PB_Gadget_FrontColor, coul_commentaire)
in the future a syntax like this, will be a good thing
Code: Select all
SetGadgetColor(#gadget, $BackColor, $FrontColor)
one instruction
Using #pb_ignore
Code: Select all
SetGadgetColor(#gadget,#pb_ignore, $FrontColor)
and of course ... support more gadget

Re: SetGadgetColor()
Posted: Thu Sep 19, 2013 10:20 am
by Bisonte
You missed something....
Code: Select all
SetGadgetColor(Gadget, BackColor, FrontColor, LineColor, TitleFrontColor, TitleBackColor, GrayTextColor)
Are you sure that you want this ?
Re: SetGadgetColor()
Posted: Thu Sep 19, 2013 11:08 am
by ozzie
We're all entitled to do things our favorite way, but here's my 2 cents worth:
When I first came to PB from VB6, I was concerned about this as well and so wrote this simple macro:
Code: Select all
Macro SetGadgetColors(GadgetNo, pFrontColor, pBackColor)
SetGadgetColor(GadgetNo, #PB_Gadget_FrontColor, pFrontColor)
SetGadgetColor(GadgetNo, #PB_Gadget_BackColor, pBackColor)
EndMacro
However, I subsequently found this was actually a bit of a pain as I didn't always want to set both colors, so I don't use the macro anymore. It's just remaining in my program to satisfy my early use of it. I now always use SetGadgetColor().
Re: SetGadgetColor()
Posted: Thu Sep 19, 2013 11:13 am
by dobro
Bisonte wrote:You missed something....
Code: Select all
SetGadgetColor(Gadget, BackColor, FrontColor, LineColor, TitleFrontColor, TitleBackColor, GrayTextColor)
Are you sure that you want this ?
I asked this?
ozzie wrote:
However, I subsequently found this was actually a bit of a pain as I didn't always want to set both colors, so I don't use the macro anymore. It's just remaining in my program to satisfy my early use of it. I now always use SetGadgetColor().
This is why I advocate the use of #pb_ignore
Re: SetGadgetColor()
Posted: Thu Sep 19, 2013 11:14 am
by Bisonte
dobro wrote:Bisonte wrote:You missed something....
Code: Select all
SetGadgetColor(Gadget, BackColor, FrontColor, LineColor, TitleFrontColor, TitleBackColor, GrayTextColor)
Are you sure that you want this ?
I asked this?

Yes...
If you have SetGadgetColor(Gadget, BackColor, FrontColor) ... how I set the other colortypes ?
Re: SetGadgetColor()
Posted: Thu Sep 19, 2013 11:21 am
by dobro
Bisonte wrote:
Yes...
If you have SetGadgetColor(Gadget, BackColor, FrontColor) ... how I set the other colortypes ?
how are you doing now?
I talk about SetGadgetColor () function
now, do not use this feature for you to color the lines that I know!
in french :
actuellement tu fais comment ?
je parle de la fonction SetGadgetColor()
actuellement, tu ne te sert pas de cette fonction pour colorer les lignes, que je sache !
Re: SetGadgetColor()
Posted: Thu Sep 19, 2013 12:39 pm
by Bisonte
I also talk about it...
for example : SetGadgetColor(MyListIconGadget, #PB_Gadget_LineColor, Color)
Look here :
http://www.purebasic.com/documentation/ ... color.html
Re: SetGadgetColor()
Posted: Fri Sep 20, 2013 7:08 am
by dobro
oh yes, I had not seen the new arguments
