How do resize a Control inserted in Richview

General TRichView support forum. Please post your questions here
Post Reply
Tarun
Posts: 13
Joined: Wed Nov 01, 2006 12:25 pm
Location: India

How do resize a Control inserted in Richview

Post 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;
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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
Post Reply