Go to Post Hey Baker - get a haircut! :) - Sean Schuff [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-03-2005, 12:56
Peter Kiers Peter Kiers is offline
Registered User
#1111
 
Join Date: Mar 2005
Location: The Netherlands
Posts: 2
Peter Kiers is an unknown quantity at this point
Scrolling through strings in a stringgrid

Hi i am Peter,

I have a litte problem:

I am working on a program that pings servers, so i use
a stringgrid with 30 servernames. The program scrolls
through the stringgrid to check the servers.

Only the program checks empty cells too!

How can i tell my program to only check the cells
that are filled with text.

I thing the change must be made in the following procedure:

procedure TForm1.GridServersDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var
Kleur: TColor;
begin
with (Sender as TStringGrid) do
begin
if gdFixed in State then Kleur := FixedColor
else if IsWaiting then Kleur := Color
else if gdFocused in State then Kleur := clYellow
else if gdSelected in State then Kleur := clLime
else Kleur := Color;
with Canvas do
begin
Brush.Color := Kleur;
Font.Color := clBlack;
FillRect(Rect);
if not IsWaiting and (gdFocused in State) then
begin
Draw(Rect.Left, Rect.Top, Image1.Picture.Graphic);
Rect.Left := Rect.Left + Image1.Width +2;
end;
TextOut(Rect.Right - TextWidth(Cells[ACol, ARow]) - 2,
Rect.Top + 2, Cells[ACol, ARow]);

end;
end;
end;


Greetings,

Peter Kiers
  #2   Spotlight this post!  
Unread 07-03-2005, 13:22
Sachiel7's Avatar
Sachiel7 Sachiel7 is offline
<Yes I managed to flip it
AKA: Shayne Helms
FRC #1132 (RAPTAR Robotics)
 
Join Date: Sep 2002
Rookie Year: 2002
Location: Richmond, VA
Posts: 541
Sachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really nice
Send a message via AIM to Sachiel7
Re: Scrolling through strings in a stringgrid

I assume that this post is Non-FIRST related.

Team 1111 is located in Edgewater MD, USA, not in the Netherlands.

This Forum is for FIRST Robotics Related discussion.

More about the competition can be found here:
http://www.usfirst.org/robotics/

As for help with your dilemma, I can offer none.
__________________
-=Sachiel7=-

There's no such thing as being too simple!
Look for Team #1132, RAPTAR Robotics at the VCU Regional this year!
  #3   Spotlight this post!  
Unread 07-03-2005, 13:26
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Scrolling through strings in a stringgrid

Well, kinda a duplicate post (because of the above), but...

http://www.chiefdelphi.com/forums/sh...ad.php?t=29944

(I think that's Delphi, anyway... don't know the language... )
__________________

  #4   Spotlight this post!  
Unread 07-03-2005, 13:28
Peter Kiers Peter Kiers is offline
Registered User
#1111
 
Join Date: Mar 2005
Location: The Netherlands
Posts: 2
Peter Kiers is an unknown quantity at this point
Re: Scrolling through strings in a stringgrid

Maybe i made a mistake
Correct me if i'm wrong:

I thought this was a Delphi-forum:

and i could ask a question when i have a problem with my program!

Greetings,

Peter Kiers
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:13.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi