Hello,
I am trying to use rvActionInsertTable1.ShowTableSizeDialog with TdxBarLargeButton (from Developer Express ExpressBars). ShowTableSizeDialog method is overloaded with TControl and TRect. Neither of them is available to TdxBarLargeButton. How can I implement this? Please help.
rvActionInsertTable1.ShowTableSizeDialog working with TdxBar
-
- Posts: 6
- Joined: Mon Sep 05, 2005 3:33 pm
In C++ :
Code: Select all
void __fastcall TfrmEditor::btnInsertTableClick(TObject *Sender)
{
TdxBarItemLink* itemLink = ((TdxBarItem*) Sender)->ClickItemLink;
Types::TRect rect = itemLink->ItemRect;
TPoint leftTop(rect.Left, rect.Top);
TPoint rightBottom(rect.Right, rect.Bottom);
leftTop = itemLink->BarControl->ClientToScreen(leftTop);
rightBottom = itemLink->BarControl->ClientToScreen(rightBottom);
rvActionInsertTable1->ShowTableSizeDialog(rvEditor->RichViewEdit, Types::TRect(leftTop, rightBottom));
}
-
- Posts: 6
- Joined: Mon Sep 05, 2005 3:33 pm
Delphi code untested:
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
itemLink: TdxBarItemLink;
rect: TRect;
leftTop, rightBottom: TPoint;
begin
itemLink := TdxBarItem(Sender).ClickItemLink;
rect := itemLink.ItemRect;
leftTop := Point(rect.Left, rect.Top);
rightBottom := Point(rect.Right, rect.Bottom);
leftTop := itemLink.BarControl.ClientToScreen(leftTop);
rightBottom := itemLink.BarControl.ClientToScreen(rightBottom);
rvActionInsertTable1.ShowTableSizeDialog(rvEditor.RichViewEdit, Rect(leftTop, rightBottom));
end;