Re: [MSEide-MSEgui-talk] set background color of stringgrid cell

2011-10-23 Thread Martin Schreiber
On Saturday 22 October 2011 16.05:19 Patrick Goupell wrote:
 Martin Schreiber mse0@... writes:
  On Saturday 22 October 2011 14.57:39 Patrick Goupell wrote:
   Is cellinfo.color the only item that needs to be set?
   
   example:  cellinfo.color := cl_green;
   
   Or do I need to do more?
  
  No.
 
 The beforedrawevent does not seem to do anything.  The background color
 never changes.
 

sgStatus.datacols.clear;

deletes all columns, the design time setting of onbeforedrawcell is lost.
Please add

sgStatus.datacols [0].onbeforedrawcell:= @sgStatusOnBeforeDraw;

Martin
___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] set background color of stringgrid cell

2011-10-23 Thread Patrick Goupell
Thanks.  I will put that in my notes so I remember it the next time I do it.


___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] set background color of stringgrid cell

2011-10-22 Thread Patrick Goupell
Martin Schreiber mse0@... writes:

 
 On Friday 21 October 2011 22.09:38 Patrick Goupell wrote:
  How can I set the background color of a stringgrid cell in program code?
  
  sgMyGrid.datacols [column][row] . ??? := cl_green;
  
 Not supported because  of the big per cell memory consumption.
 MSEgui has symbolic color settings for row colors (t*grid.rowcolors, 
 t*grid.rowcolorstate, can be switched off for a column by resetting 
 tdatacol.options1 co1_rowcolor) and color settings for columns 
 (t*col.color*). 
 In order to define the color of single cells use tdatacol.onbeforedrawcell 
 and 
 update the cellinfo values.
 
 Martin
 

Is cellinfo.color the only item that needs to be set?  

example:  cellinfo.color := cl_green;

Or do I need to do more?


___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] set background color of stringgrid cell

2011-10-22 Thread Martin Schreiber
On Saturday 22 October 2011 16.51:05 Patrick Goupell wrote:
  Works for me, please send a simple testcase.
  
  Martin
 
 How / where should I send it.
 
Compress the *.pas, *.mfm and the *.prj file into a *.zip or *.tar.gz and 
attach it to a mail to mseide-msegui-talk@lists.berlios.de.

Martin
___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] set background color of stringgrid cell

2011-10-21 Thread Martin Schreiber
On Friday 21 October 2011 22.09:38 Patrick Goupell wrote:
 How can I set the background color of a stringgrid cell in program code?
 
 sgMyGrid.datacols [column][row] . ??? := cl_green;
 
Not supported because  of the big per cell memory consumption.
MSEgui has symbolic color settings for row colors (t*grid.rowcolors, 
t*grid.rowcolorstate, can be switched off for a column by resetting 
tdatacol.options1 co1_rowcolor) and color settings for columns (t*col.color*). 
In order to define the color of single cells use tdatacol.onbeforedrawcell and 
update the cellinfo values.

Martin
___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk