06-06-2018, 06:26 PM
كيف لم يعمل ، هل وضعته بالحدث المناسب له وربطته بالاداة DBgrid
انا لم اجرب شيئا وانما بحتث لك عن المعلومة فقط ، مثال أخر
انا لم اجرب شيئا وانما بحتث لك عن المعلومة فقط ، مثال أخر
PHP كود :
procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const
Rect: TRect; Field: TField; State:
TGridDrawState);
var
P: array [0..50] of char; {array size is number of
characters needed}
bs: TBlobStream; {from the memo field}
hStr: String;
begin
if Field is TMemoField then
begin
with (Sender as TDBGrid).Canvas do
begin {Table1Notes is the TMemoField}
bs := TBlobStream.Create(Table1Notes, bmRead);
FillChar(P,SizeOf(P),#0); {terminate the null string}
bs.Read(P, 50); {read 50 chars from memo into blobStream}
bs.Free;
hStr := StrPas(P);
while Pos(#13, hStr) 0 do {remove carriage returns and}
hStr[Pos(#13, hStr)] := ' ';
while Pos(#10, hStr) 0 do {line feeds}
S[Pos(#10, hStr)] := ' ';
FillRect(Rect); {clear the cell}
TextOut(Rect.Left, Rect.Top, hStr); {fill cell with memo
data}
end;
end;
end;
قل: اللهم فاطِرَ السماوات والأرض عالم الغيبِ والشهادة، ربَّ كُلِّ شَيءٍ ومَلِيكَه، أَشْهد أن لا إله إلا أنت، أعوذ بك من شرِّ نفسي وشرِّ الشيطان وشِرْكِهِ وأن أقترف على نفسي سوءًا أو أجرُّه إلى مسلم


![[-]](https://delphi4arab.net/forum/D4A2020/collapse.png)