AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

TStringGrid inner margin

Ein Thema von sk.Silvia · begonnen am 8. Feb 2006 · letzter Beitrag vom 8. Feb 2006
 
marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#3

Re: TStringGrid inner margin

  Alt 8. Feb 2006, 17:36
Welcome to our community, Silvia.

The gap you object to is produced by the default drawing method of the cell. If you have an event handler for the OnDrawCell() event you can set horizontal and vertical gaps at will:

Delphi-Quellcode:
procedure TDemoForm.StringGridDrawCell(Sender: TObject; ACol,
  ARow: Integer; Rect: TRect; State: TGridDrawState);
const
  hGap = 0;
  vGap = 0;
begin
  with Sender as TStringGrid do
  begin
    Canvas.FillRect(Rect);
    TextOut(Canvas.Handle, Rect.Left + hGap, Rect.Top + vGap,
      PAnsiChar(Cells[ACol, ARow]), Length(Cells[ACol, ARow]));
  end;
end;
Kind regards

marabu
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:36 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz