Your OnDraw event is flawed. First of all, do NOT get the data from within the 
onDraw event! Your only putting code in to handle custom drawing of the control.
    
     You did say "field" so I assume you want to color the columns?. Get rid of 
the for loops since it already loops through each cell. It starts at the top 
left and ends up at the bottom right. Just have it check the column property as 
it goes and color the cell based on that. You could put the color for that 
column in the column tag property. The code to set the color for each column is 
put in the appropriate place outside of this event (button click or whatever). 
You'd have to give each column tag a default property in order for it not to be 
black with ($000000) until your code executes.
  (Tip: defined your cutom colors as a constant at top of form):
   
  constants
    clAmber: TColor($0011FF); <-- only 6 digits for a color!!!
   
  procedure TOverviewForm.SGDrawCell(Sender: TObject; ACol, ARow: Integer;Rect: 
TRect; State: TGridDrawState);
  begin
  Case ACol Of
  0:   color := SG.Column[0].Tag;
  1:   color := SG.Columns[1].Tag;
  etc.
end;
   
   
  
"Wilson, Stephen" <[EMAIL PROTECTED]> wrote:
            New Message Search
  Find the message you want faster. Visit your group to try out the improved 
message search.
  

    
  
  Share feedback on the new changes to Groups


    Recent Activity
    
      9
  New Members

Visit Your Group 
  SPONSORED LINKS
      
   C programming language  
   Computer programming languages  
   Java programming language  
   The c programming language  
   C programming language


  .

 
         

                
---------------------------------
Groups are talking. We&acute;re listening. Check out the handy changes to 
Yahoo! Groups. 

[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to