Текущий архив: 2002.10.31;
Скачать: CL | DM;
Вниз
День добрый! Найти похожие ветки
← →
shubin (2002-10-22 10:01) [0]Необходимо вывести в Grid нестандарный отчёт. Как сделать чтобы высота строк в Gride была разной?
← →
Song © (2002-10-22 10:05) [1]RowHeight[] ?
← →
Кулюкин Олег © (2002-10-22 10:08) [2]RowHeight[] !
← →
turusov © (2002-10-22 10:37) [3]Самое удобное на мой взгляд (Excel)TExcelApplication
Для увеличения скорости используй Вариантный массив из одномерных Вариантных массивов. Типы variant он понимает.
function TNsExcel2000.PutArray(Row: integer; Data: array of variant): boolean; //
begin
Result:= False;
Result:= PutRows(Row,GetVarArray(Data)) <> 0;
end;
function TNsExcel2000.PutRows(BeginRow: integer; const ArrValue: variant): integer;
var
b1, b2, Temp: OleVariant;
begin
try
Result:= 0;
if Connected then begin
if (TVarData(ArrValue).VType AND NOT varTypeMask) <> varArray then begin
if PutVariant(BeginRow,1,ArrValue) then
Result:= BeginRow+1
else
raise Exception.Create(nsePutStr);
// Result:= 0;
end
else
if VarArrayDimCount(ArrValue) = 1 then begin
if PutRowVariant(BeginRow,ArrValue) then
Result:= BeginRow+1
else
raise Exception.Create(nsePutStr);
// Result:= 0;
end
else
if VarArrayDimCount(ArrValue) = 2 then begin
Temp:= ArrValue;
b1:= NsWorkbook.Application.Cells._Default[BeginRow,1];
b2:= NsWorkbook.Application.Cells._Default[BeginRow+VarArrayHighBound(Temp,1)-1,VarArrayHighBound(Temp,2)];
OleVariant(NsWorkbook.Application).Range[b1,b2].Value:= Temp;
Result:= BeginRow+VarArrayHighBound(Temp,1);
end;//if 2 end;//if Connected
except
on E:Exception do begin
Result:= 0;
if MessageBox(Forms.Application.Handle,PChar(Format(nseOutExcel,[E.Message])),
PChar(nseExcel), MB_YESNO OR MB_ICONHAND) = mrYes then
Result:= PutRows(BeginRow,ArrValue)
else
raise;
end;
end;//try
end;
← →
turusov © (2002-10-22 11:00) [4]Компонент дам без проблем
← →
shubin (2002-10-22 12:31) [5]В Exel"е все получается, нужно в Gride. Блин не могу досбраться до свойства!!! RowHeight[] - ?
← →
Игорь Шевченко © (2002-10-22 12:33) [6]shubin (22.10.02 12:31)
type
TMyCoolGrid = class(TDBGrid)
public
property RowHeights;
end;
← →
Игорь Шевченко © (2002-10-22 12:34) [7]Пардон,
TMyCoolGrid = class(TCustomGrid)
← →
shubin (2002-10-22 12:36) [8]У меня Grid c двойными заголовками, уже раскрашеный и с отформатированным выводом - мне не одно свойство надо!
← →
Игорь Шевченко © (2002-10-22 12:37) [9]Для того, чтобы менять RowHeights хватит и одного :-)
← →
shubin (2002-10-22 13:06) [10]Спасибо всем! Всё оказалось проще через статическое приведение типов к TStringGrid!
← →
Song © (2002-10-22 13:44) [11]Ну наконец-то выяснилось что у автора за класс был.. :-)
← →
Polevi © (2002-10-22 14:48) [12]:-)
Страницы: 1 вся ветка
Текущий архив: 2002.10.31;
Скачать: CL | DM;
Память: 0.49 MB
Время: 0.013 c