Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

change row of dbgrid font

Posted on 2003-02-27
2
Medium Priority
?
544 Views
Last Modified: 2013-12-03
Hi,
I would like to strikeout one row in DBgrid, something like in outlook express when you delete one message.

Someting like
dbgrid1.Font.Style:=[fsStrikeOut] but only for one exact row.

Thanks.
Raf
0
Comment
Question by:raf7
2 Comments
 

Author Comment

by:raf7
ID: 8036772
done
0
 
LVL 3

Accepted Solution

by:
ILE earned 300 total points
ID: 8038683

100% working solution

i have one button and one dbgrid with data and
one row has a title 'Nv'


and when u click on button u have  underline and don't have underline;
i use event DrawDataCell for acomplish the task



procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect;
  Field: TField; State: TGridDrawState);
  var s:string;
  begin
   if (field.displayname='Nv') and flag then
   begin
     dbgrid1.canvas.font.Style:=[fsunderline];
     dbgrid1.canvas.textrect(rect,rect.left,rect.top,field.Text);
   end;
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
flag:=not(flag);
dbgrid1.Repaint;
end;


:))
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question