Page 1 of 1

How do resize a Control inserted in Richview

Posted: Thu Jul 12, 2007 8:22 pm
by Tarun
Hi,

I am getting a problem.
I have inserted a Control in Richview, but i am not able to resize that control, even if i have set the Extra item property resizeable

This is the code i have written

procedure TForm1.Sample;
var
LPanel : TPanel;
begin
LPanel := TPanel.Create(nil);

RichViewEdit1.InsertControl('Test', LPanel, rvvaBaseline );
RichViewEdit1.Format;

RichViewEdit1.SetItemExtraIntPropertyEd(0, rvepResizable, 100, True );
end;

Posted: Fri Jul 13, 2007 6:17 am
by Sergey Tkachenko
Item (picture or control) can be resized when it is selected.
TRichViewEdit selects pictures on single click. But it cannot select controls because controls receive mouse click, not editor.
You need to process Control.OnClick (or, better, OnMouseDown, if you want to support drag&drop as well) to select the clicked control.
The example: http://www.trichview.com/forums/viewtopic.php?t=157