Jump to content


chris

Member Since 20 Jun 2005
Offline Last Active Jan 13 2010 11:43 AM
-----

Topics I've Started

[3.9.4] Slow SetSelected

18 December 2006 - 04:26 PM

hi boki

procedure TNextGrid.SetSelected(Index: Integer; const Value: Boolean);
begin
if RowExist(Index) and (Selected[Index] <> Value) then
begin
FCells.Row[Index].Selected := Value;
case GridStyle of
gsReport: RefreshRow(Index);
gsSlides: RefreshSlide(Index, not(aoHighlightSlideCells in AppearanceOptions));
end;
end
end;

miss something like


if UpdateCount = 0 then RefreshRow(Index);

so


procedure TNextGrid.SetSelected(Index: Integer; const Value: Boolean);
begin
if RowExist(Index) and (Selected[Index] <> Value) then
begin
FCells.Row[Index].Selected := Value;
if UpdateCount=0 then
begin
case GridStyle of
gsReport: RefreshRow(Index);
gsSlides: RefreshSlide(Index, not(aoHighlightSlideCells in AppearanceOptions));
end;
end;
end
end;

TNxCustomPropertyItem.GetFullText bug V3.5

24 April 2006 - 12:41 PM

hi,

function TNxCustomPropertyItem.GetFullText: WideString;
begin
result:='';
Result := Value + SuffixValue;
end;

i was obliged to initialise result because if value and suffix value are empty result does not return '' but the prior value.

need help on getnextsibling

06 April 2006 - 01:05 PM

hello,
what is exactly for ?
is it to find next parent or to find next record on same level ?

procedure TNextGrid.AddCells

29 March 2006 - 08:28 PM

hi
in V3.5 the line with exit i replace > by >=

procedure TNextGrid.AddCells(Values: array of WideString);
var
I, Col: Integer;
begin
AddRow;
I := 0;
while I < Length(Values) do
begin
for Col := 0 to Columns.Count - 1 do
begin
Cells[Col, RowCount - 1] := Values[I];
Inc(I);
if I >= Length(Values) then Exit;
end;
if I < Length(Values) then AddRow;
end;
end;

slowly swaprows

22 February 2006 - 06:38 PM

hello
it was just a refresh problem
i updated tnextgrid.swaprows to speed it up on a .beginupdate

procedure TNextGrid.SwapRows(FromPos, ToPos: Integer);
begin
FCells.SwapRows(FromPos, ToPos);
if UpdateCount = 0 then
begin
RefreshRow(FromPos);
RefreshRow(ToPos);
end;
end;