Procedure TWPCustomRichText.OnToolBarIconSelection(Sender:TObject; Typ:TWpSelNr; str:string; group:Integer; num:Integer; index:Integer)

Unit: WPCTRRich
Class: WPCTRRich.TWPCustomRichText

Parameters

  • Sender:TObject
  • Typ:TWpSelNr
  • str:string
  • group:Integer
  • num:Integer
  • index:Integer

Description

This code handles most user interaction from the TWPToolBar. Sometimes it makes sens to call it from custom code.
This example opens the create-table drop down: procedure TForm1.btnTableClick(Sender: TObject); var Typ: TWpSelNr; begin Typ := wptIconSel; WPRichText1.OnToolBarIconSelection( nil, // We do not call from toolbar but directly Typ, // wptIconSel = Click on Button '', // We have no string parameter WPI_GR_TABLE, // the command group - here "Table" WPI_CO_CreateTable, 0 // no index ); end; <(code>