Page 1 of 1
Posted: Tue Aug 20, 2002 4:33 pm
by BackupUser
Restored from previous forum. Originally posted by Pantcho!.
Hello People.
i saw Danilo Example for Listbox Colors
and i tried to use it with Tree and Listicon gadgets
and all my tries went....
if anyone can help...
thank you.
Pantcho.
Posted: Tue Aug 20, 2002 4:47 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.
Does this help?? ...
Code: Select all
hWnd=OpenWindow(0,10,10,300,200,#PB_Window_SystemMenu,"Color List View")
If hWnd=0 Or CreateGadgetList(hWnd)=0:End:EndIf
LI=ListIconGadget(1,10,10,280,180,"Name",100,#PB_ListIcon_GridLines)
AddGadgetColumn(1,1,"Address",120)
AddGadgetColumn(1,2,"Phone",50)
SendMessage_(LI, #LVM_SETBKCOLOR,0,$ffffaa)
SendMessage_(LI, #LVM_SETTEXTBKCOLOR,0,$ffffaa)
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow

Posted: Tue Aug 20, 2002 4:57 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.
Another example using TreeGadget this time...
Code: Select all
#TVM_SETBKCOLOR=$1100+29
#TVM_SETTEXTCOLOR=$1100+30
hWnd=OpenWindow(0,10,10,300,200,#PB_Window_SystemMenu,"Color List View")
If hWnd=0 Or CreateGadgetList(hWnd)=0:End:EndIf
LI=TreeGadget(1,10,10,200,180)
SendMessage_(LI, #TVM_SETBKCOLOR,0,$ffffaa)
SendMessage_(LI, #TVM_SETTEXTCOLOR,0,$0000ff)
AddGadgetItem(1,-1,"Test 1")
AddGadgetItem(1,-1,"Test 2")
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
Posted: Tue Aug 20, 2002 8:55 pm
by BackupUser
Restored from previous forum. Originally posted by Pantcho!.
Fanks!
that is a great example paul , Thank u!
any chance of changing the Selected text color?
the Blue Background to Black and the text to green?

Posted: Tue Aug 20, 2002 9:00 pm
by BackupUser
Restored from previous forum. Originally posted by ricardo.
Pantcho, i hacent send you the codes but im not finished yet, im still on experimental stage, and i lose your email... sorry : (
I will send it when i have some decent code.
Thanks
Posted: Tue Aug 20, 2002 9:19 pm
by BackupUser
Restored from previous forum. Originally posted by Pantcho!.
Hey ricardo

i am now going to army and i will be back on friday.
so if u want u can email me until then in - [url]mailto:
noamidc@012.net.il[/url]
and u can send me everything u want even if its some cool snippets!
cya
Posted: Fri Aug 23, 2002 5:29 pm
by BackupUser
Restored from previous forum. Originally posted by Justin.
That works fine, but does anybody know if it is possible to have items with different text colors in the same listicon?, and be able to change the text colors dinamically?
Posted: Mon Aug 26, 2002 2:40 pm
by BackupUser
Restored from previous forum. Originally posted by Pantcho!.
i would like to know that also!!
and even the highliter color of the tree or the gdaget iteself
like if i pick an item on a listbox or tree i want that the highlight will be on black background and green forground...
how can i do that?