You are not logged in.
Pages: 1
very simple replace text in header drawgirid use function
fieldText: array [0..10] of string = (
'№',
'№ БЛ',
'Выдан',
'Фамилия',
'Имя',
'Отчество',
'Д/р',
'Место работы',
'пред БЛ',
'след БЛ',
'#');
...
SQLTableToGrid.OnValueText := OnListText;
...
function TfrmMain.OnListText(Sender: TSQLTable; FieldIndex, RowIndex: Integer; var Text: string): boolean;
begin
if RowIndex = 0 then begin
Text := fieldText[FieldIndex];
Result := True;
end
else
Result := False;
end;
but how change hint (sample right click on header), i dont find this function, and no option to disable
Offline
i change in source from
procedure TSQLTableToGrid.DrawGridMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
...
if ARow=0 then
if (ssCtrl in Shift) or (Button<>mbLeft) then begin
// Ctrl or right button pressed -> display first row as hint
ShowHintString(U2S(Table.Get(ARow,ACol)),ACol,ARow,4000);
to
SQLTableToGrid.OnHintText := OnListText;
procedure TSQLTableToGrid.DrawGridMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
...
if ARow=0 then
if (ssCtrl in Shift) or (Button<>mbLeft) then begin
// Ctrl or right button pressed -> display first row as hint
if Assigned(OnHintText) and OnHintText(Table,ACol,ARow,Hint) then
ShowHintString(Hint,ACol,ARow,4000)
else
ShowHintString(U2S(Table.Get(ARow,ACol)),ACol,ARow,4000);
its work and view russian name column, but first i see english column name before draw russian column name. How draw text without this bug?
Last edited by noobies (2015-03-11 06:42:15)
Offline
Pages: 1