Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

How to write a borders.

 Post Reply Post Reply
Author
Yokoe Hideo View Drop Down
New Member
New Member
Avatar

Joined: 29 Oct 2015
Posts: 19
Post Options Post Options   Quote Yokoe Hideo Quote  Post ReplyReply Direct Link To This Post Topic: How to write a borders.
    Posted: 27 Jan 2016 at 8:19am
I want to write a border in the framework of the cell.
(Without AdvStringGrid1GetCellBorder )
Do you have the other of the following methods (by Demo asg43) ?

For example, in this way....
  AdvStringGrid1.Borders[i,j,x,y]:=[cbLeft];

//--------------------------------
//by Demo asg43
//--------------------------------
procedure TForm1.AdvStringGrid1GetCellBorder(Sender: TObject; ARow,
  ACol: Integer; APen: TPen; var Borders: TCellBorders);
begin
  if not Odd(ACol) and (ARow > 0) and (ACol > 0) then
  begin
    Borders := [cbLeft];
    APen.Width := 1;
    APen.Color := clBlack;
  end;

  if not Odd(ARow) and (ARow > 0) and (ACol > 0) then
  begin
    Borders := Borders + [cbBottom];
    APen.Width := 1;
    APen.Color := clBlack;
  end;

end;
Back to Top
Yokoe Hideo View Drop Down
New Member
New Member
Avatar

Joined: 29 Oct 2015
Posts: 19
Post Options Post Options   Quote Yokoe Hideo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2016 at 8:44am
I want to know how to draw the borders , such as in this picture .
https://i.gyazo.com/6a8d31686ebd4ba2d39781e332cb012e.png

best regards
# Windows7(64) / Delphi10 
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8939
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2016 at 9:36am
Borders are always customized via the event OnGetCellBorder / OnGetCellBorderProp.There are currently no border related cell based properties.
Back to Top
Yokoe Hideo View Drop Down
New Member
New Member
Avatar

Joined: 29 Oct 2015
Posts: 19
Post Options Post Options   Quote Yokoe Hideo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2016 at 11:27am
Hi Bruno, 
thank's for your reply. 
I try the  TMS Flexcel demo .
Back to Top
Yokoe Hideo View Drop Down
New Member
New Member
Avatar

Joined: 29 Oct 2015
Posts: 19
Post Options Post Options   Quote Yokoe Hideo Quote  Post ReplyReply Direct Link To This Post Posted: 01 Feb 2016 at 1:08am
I see.Thank you.It is a great feature.
by the way,This is drawn from the upper left.
I want to draw in the lower left corner.
How to get the width and height ?

Back to Top
Yokoe Hideo View Drop Down
New Member
New Member
Avatar

Joined: 29 Oct 2015
Posts: 19
Post Options Post Options   Quote Yokoe Hideo Quote  Post ReplyReply Direct Link To This Post Posted: 01 Feb 2016 at 1:15am
I'm sorry. I was the wrong place to post.
This post is closed in me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down