如何在Delphi中制作这样的东西:
我知道我可以从3张桌子上制作它,因此它会更容易,但我怎样才能让桌面细胞分裂和放大合并以及如何让文本转90deg。?
是否有一些好的内容库可以分割和分割合并内置?
答案 0 :(得分:1)
结帐woll2woll
或infopower
。他们肯定会做网格。可以通过覆盖OnDrawDataCell
,OnDrawGroupHeaderCell
和OnDrawTitleCell
事件并使用旋转字体书写文本来实现字体。
{****************************************************************
* Create angled font. Procedure writen by Keith Wood *
****************************************************************}
procedure CreateAngledFont (AFont : TFont; const AAngle : Integer);
var
FntLogRec: TLogFont { Storage area for font information } ;
begin
{ Get the current font information. We only want to modify the angle }
fillchar (FntLogRec, sizeof(FntLogRec), #0);
GetObject (AFont.Handle, SizeOf(FntLogRec), Addr(FntLogRec));
{ Modify the angle. "The angle, in tenths of a degrees, between the base
line of a character and the x-axis." (Windows API Help file.) }
FntLogRec.lfEscapement := (AAngle * 10);
FntLogRec.lfOrientation := (AAngle * 10);
FntLogRec.lfOutPrecision := OUT_TT_PRECIS; { Request TrueType precision }
{ Delphi will handle the deallocation of the old font handle }
AFont.Handle := CreateFontIndirect (FntLogRec);
end;