Page 1 of 1
					
				
				Posted: Mon Feb 04, 2002 9:12 pm
				by BackupUser
				Restored from previous forum. Originally posted by cor.
 How to change background color of ListViewgadget?
Using Windows 98 SE
Registered PB version : 2.90 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com 
			 
			
					
				
				Posted: Mon Feb 04, 2002 10:16 pm
				by BackupUser
				Restored from previous forum. Originally posted by El_Choni.
 Insert this within your OpenWindow() part:
Code: Select all
  ListIconGadget = ListIconGadget(0, 0, 0, LVWidth, WindowHeight()-30, "This", LVWidth/4-1)
  AddGadgetColumn(0, 1, "is", LVWidth/4-1)
  AddGadgetColumn(0, 2, "a", LVWidth/4-1)
  AddGadgetColumn(0, 3, "test", LVWidth/4-1)
  SendMessage_(ListIconGadget, #LVM_SETBKCOLOR, 0, RGB(128, 128, 128)) ; change blank cells background color
  SendMessage_(ListIconGadget, #LVM_SETTEXTBKCOLOR, 0, RGB(216, 64, 216)) ; change cells background color
  SendMessage_(ListIconGadget, #LVM_SETTEXTCOLOR, 0, RGB(0, 32, 128)) ; change text color
  AddListIconGadgetItem(0, 0, "Column 1"+Chr(10)+"Column 2"+Chr(10)+"Column 3"+Chr(10)+"Column 4", 0)
There is a GET version for those SendMessage_(). Bye,
El_Choni
 
			 
			
					
				
				Posted: Mon Feb 04, 2002 11:06 pm
				by BackupUser
				Restored from previous forum. Originally posted by PB.
 What's the RGB procedure code?  
PB - Registered PureBasic Coder
			 
			
					
				
				Posted: Mon Feb 04, 2002 11:52 pm
				by BackupUser
				Restored from previous forum. Originally posted by El_Choni.
 Guess you're joking, but just in case you're not, RGB() isn't a procedure, is a PureBasic function that translates red, green and blue values to Windows COLORREF format to use with functions.
(You were joking, right?)
Sleep well,
El_Choni
PS: you were right, it can be a procedure:
Code: Select all
Procedure.l RGB(red.b, green.b, blue.b)
  colorref.l = red + (green*256) + (blue*65536)
  ProcedureReturn colorref
EndProcedure
Edited by - El_Choni on 04 February 2002  23:58:43
 
			 
			
					
				
				Posted: Tue Feb 05, 2002 1:48 am
				by BackupUser
				Restored from previous forum. Originally posted by Paul.
 Actually RGB() is not a native command to PureBasic.  It is found in the ASM SkinWin library by Danilo, found on the PB Resources Site.
Edited by - paul on 05 February 2002  01:48:45
			 
			
					
				
				Posted: Tue Feb 05, 2002 4:32 am
				by BackupUser
				Restored from previous forum. Originally posted by El_Choni.
 Ok, sorry, PB, then. You know, Danilo's library is a must! 
 
Bye,
El_Choni
 
			 
			
					
				
				Posted: Tue Feb 05, 2002 10:29 am
				by BackupUser
				Restored from previous forum. Originally posted by PB.
 > Ok, sorry, PB, then. You know, Danilo's library is a must! 
 
Hehehe, no worries.  
PB - Registered PureBasic Coder