?
Solved

change row of dbgrid font

Posted on 2003-02-27
2
Medium Priority
?
540 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: 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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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
Course of the Month13 days, 20 hours left to enroll

801 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