TIP: Click on subject to list as thread! ANSI
echo: delphi
to: JOAQUIM HOMRIGHAUSEN
from: GARY WEINFURTHER
date: 1997-11-21 18:28:00
subject: D1: TStringGrid column sizing

Joaquim Homrighausen mentioned this to All:
 JH> I then use the
 JH> GetTextExtent() call to figure out the width in pixels
You can use the Canvas.TextWidth method to do this, too.
 JH> , and then tell TSG
 JH> that column such and such should be of this width, it works for all
 JH> columns with one exception:
 JH>   XS:=FormatDateTime('ddddd @ t', Now);
I don't know why it should be unusually long.  Try it using 
StringGrid1.Canvas.TextWidth and see if you get the same result.
                                ...Gary
--- GoldED 2.41
---------------
* Origin: Nobody expects the Flying Circus BBS! (1:2410/905)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.