documentation - TdxRichEditControl on delphi? how to add and get rich text to this programatically? -
is here worked tdxricheditcontrol devexpress on delphi? devexpress don't provide docs on how add , rich text control programatically. or suggestion embedded full text editor in program ? on delphi seattle.
my situation: creating program on user need rich text editing bold,italic,underlining, font size, font family, paragraph aligning. ve putted dbrichedit load model of text on user make changes. need take model text tdxricheditcontrol apply changes , again dbrichedit save in database.
if want insert portions of text control, code used use copying 1 devexpress richedit another.. might able adapt copy source (warning - it's few years old):
procedure appendtorichedit(const source, dest: tcxrichedit) ; var rtfstream: teditstream; stream : tmemorystream; function editstreamreader(dwcookie: dword; pbuff: pointer; cb: longint; pcb: plongint): dword; stdcall; begin result := $0000; try pcb^ := tstream(dwcookie).read(pbuff^, cb); except result := $ffff; end; end; begin stream := tmemorystream.create; try source.lines.savetostream(stream) ; stream.position := 0; rtfstream.dwcookie := dword(stream) ; rtfstream.dwerror := $0000; rtfstream.pfncallback := @editstreamreader; dest.innercontrol.perform(em_streamin, sff_selection or sf_rtf or sff_plainrtf, lparam(@rtfstream)) ; if rtfstream.dwerror <> $0000 raise exception.create('error appending rtf data.') ; stream.free; end; end;
Comments
Post a Comment