Tables and Controls

General TRichView support forum. Please post your questions here
Post Reply
BernhardRoos
Posts: 104
Joined: Mon Nov 26, 2007 1:49 pm

Tables and Controls

Post by BernhardRoos »

If I set controls (TEdit,TCombobox, ...) in a Table, then I can't select it (even I've set the extra int property to rvepResizable.
Is there to do anything else?
Best wishes
Bernhard
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You should be able to select and resize them. There is only one problem: when the control is in the cell, TRichView cannot draw resize handles outside this cell. It may be a problem if CellPadding is small.
BernhardRoos
Posts: 104
Joined: Mon Nov 26, 2007 1:49 pm

Post by BernhardRoos »

Hm... I've made very big cell and inserted into this cell a TEdit. But I cannot select it (and so not resize it). The Inserting of the Control I've made in the same way as I've inserted outside a table cell. Outside table it works and inside table cell it works not.
Perhaps I'm missing something.

Here is my insert routine :

RichViewEdit1.InsertControl('', c, rvvaAbsMiddle);
RichViewEdit1.SetItemExtraIntProperty(RichViewEdit1.FindControlItemNo(c), rvepResizable, 1);

Best wishes
Bernhard
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The correct code is:

Code: Select all

if RichViewEdit1.InsertControl('', c, rvvaAbsMiddle) then
  RichViewEdit1.TopLevelEditor.SetItemExtraIntProperty(RichViewEdit1.TopLevelEditor.FindControlItemNo(c), rvepResizable, 1)
or

Code: Select all

if RichViewEdit1.InsertControl('', c, rvvaAbsMiddle) then
  RichViewEdit1.TopLevelEditor.SetItemExtraIntProperty(RichViewEdit1.TopLevelEditor.CurItemNo, rvepResizable, 1)
or

Code: Select all

if RichViewEdit1.InsertControl('', c, rvvaAbsMiddle) then
  RichViewEdit1.SetCurrentItemExtraIntProperty(rvepResizable, 1, False)
BernhardRoos
Posts: 104
Joined: Mon Nov 26, 2007 1:49 pm

Post by BernhardRoos »

Now it works fine. Thanks again for the very good support.
Best wishes
Bernhard
Post Reply