type TExcelColor = (xc0,xc1,xc2,xc3,xc4,xc5,xc6,xc7,
xcBlack,xcWhite,xcRed,xcBrightGreen,xcBlue,xcYellow,xcPink,xcTurquoise,
xcDarkRed,xcGreen,xcDarkBlue,xcBrownGreen,xcViolet,xcBlueGreen,xcGray25,xcGray50,
xc24,xc25,xc26,xc27,xc28,xc29,xc30,xc31,
xc32,xc33,xc34,xc35,xc36,xc37,xc38,xc39,
xcSky,xcPaleTurquois,xcPaleGreen,xcLightYellow,xcPaleSky,xcRose,xcLilac,xcLightBrown,
xcDarkSky,xcDarkTurquois,xcGrass,xcGold,xcLightOrange,xcOrange,xcDarkBlueGray,xcGray40,
xcDarkGreenGray,xcEmerald,xcDarkGreen,xcOlive,xcBrown,xcCherry,xcIndigo,xcGray80,
xcAutomatic);
const TDefaultExcelColorPalette: array[0..64] of integer = (
$000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000,
$000000, $FFFFFF, $0000FF, $00FF00, $FF0000, $00FFFF, $FF00FF, $FFFF00,
$000080, $008000, $800000, $008080, $800080, $808000, $C0C0C0, $808080,
$FF9999, $663399, $CCFFFF, $FFFFCC, $660066, $8080FF, $CC6600, $FFCCCC,
$800000, $FF00FF, $00FFFF, $FFFF00, $800080, $000080, $808000, $FF0000,
$FFCC00, $FFFFCC, $CCFFCC, $99FFFF, $FFCC99, $CC99FF, $FF99CC, $99CCFF,
$FF6633, $CCCC33, $00CC99, $00CCFF, $0099FF, $0066FF, $996666, $969696,
$663300, $669933, $003300, $003333, $003399, $663399, $993333, $333333,
$FFFFFF);
логично предположить, что это и есть эти цвета.uses
. RusTrans
. Можно положить RusTrans.pas
в папку с проектом, например. Или RusTrans.dcu
.А без это RusTrans можно делать ?Нет. Вы же используете функции из него (
Rus
).отдельно самостоятельно нужно создавать RusTrans.dcu?Без
RusTrans.pas
вы сами не сделаете RusTrans.dcu
. DrawCellTextOut
, выводить в TDBGrid так:procedure TAlbumDetailFR.grReleaseDrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumnEh; State: TGridDrawState);
var iLeft: Integer;
begin
case DataCol of
0: with grRelease.Canvas do begin
FillRect( Rect );
iLeft := 2;
DrawCellTextOut( TDBGridEh(Sender).Canvas, Rect, iLeft, taReleaseYear.Value + ' ' );
Font.Style := [fsBold];
DrawCellTextOut( TDBGridEh(Sender).Canvas, Rect, iLeft, taReleaseNumber.Value + ' ' );
Font.Style := [];
DrawCellTextOut( TDBGridEh(Sender).Canvas, Rect, iLeft, taReleaseFirmName.Value );
end;
end;
end;
DrawCellTextOut
:procedure DrawCellTextOut( Canvas: TCanvas; const Rect: TRect; var Left: Integer; Text: String );
begin
with Canvas do begin
if ( Length( Trim( Text )) > 0 )
and (( Rect.Right - Rect.Left - Left ) > ( TextWidth('…') + 1)) then begin
while (( TextWidth( Text ) + 1 ) > ( Rect.Right - Rect.Left - Left ))
do Text := Copy( Text, 1, Length( Text ) - 2) + '…';
TextOut( Rect.Left + Left, Rect.Top + 1, Text );
Inc( Left, TextWidth( Text ) + 1);
end;
end;
end;
TComboBox.Style
TComboBox
если ComboBox1.ItemIndex < 0
. type
TFormMain = class(TForm)
DBGrid1: TDBGrid;
DBText1: TDBText;
procedure FormCreate(Sender: TObject);
private { Private declarations }
public { Public declarations }
end;
var
FormMain: TFormMain;
implementation
{$R *.dfm}
procedure TFormMain.FormCreate(Sender: TObject);
begin
DBText1.DataSource := DBGrid1.DataSource;
DBText1.Field := DBGrid1.DataSource.DataSet.FieldByName('id')
end;
end.
Frame31.Left := 0;
Frame31.Top := 0;
Frame31.Width := Form1.ClientWidth;
Frame31.Height := Form1.ClientHeight;
Align = alClient
фреймах высота может быть очень большой, поэтому должна быть возможность скроллить форму