ActiveDatabaseSoftware.ActiveQueryBuilder Namespace > QueryBuilder Class : ControlCreated Event |
'Declaration Public Event ControlCreated As ControlCreatedEventHandler
'Usage Dim instance As QueryBuilder Dim handler As ControlCreatedEventHandler AddHandler instance.ControlCreated, handler
public event ControlCreatedEventHandler ControlCreated
public: __event ControlCreatedEventHandler* ControlCreated
Use this event to customize internal controls and to add additional controls to the component.
The following combination of control and owner parameters are possible:
- owner is Query; control is TabPage (main query tab).
- owner is SubQuery; control is TabPage (sub-query tabs).
- owner is QueryColumnList; control is QueryColumnListControl.
- owner is DataSourceObject; control is DataSourceControl (database objects at Design Pane).
- owner is DataSourceQuery; control is DataSourceControl (sub-queries at Design Pane).
- owner is Link; control is LinkControl.
- owner is UnionSubQuery; control is UnionSubQueryPanel (you can get the link to DesignPane object here using the UnionSubQuery.DesignPane.GetControl method).
- owner is UnionSubQuery; control is UnionButton.
- owner is UnionSubQuery; control is UnionOperator.
- owner is UnionGroup; control is LeftBracket.
- owner is UnionGroup; control is RightBracket.
- owner is UnionGroup; control is UnionOperator.
private void queryBuilder1_ControlCreated(ControlOwner owner, Control control) { if (owner is DataSourceQuery && control is DataSourceControl) { DataSourceControl dataSourceControl = (DataSourceControl) control; // insert a small button above fields list Button customButton = new Button(); customButton.Height = dataSourceControl.FieldList.ItemHeight; customButton.Dock = DockStyle.Top; customButton.Click += customButton_Click; dataSourceControl.Controls.Add(customButton); } }