Class TButtonX (unit ButtonImpl) |
Inherits from
TActiveXControl
IButtonX
IOLEObject
IPerPropertyBrowsing
Renamed from ButtonImpl.pas 6/8/1998 Paul Rice to avoid conflict with PropBag example.
procedure Click;
procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
procedure EventSinkChanged(const EventSink: IUnknown);
function GetDisplayString(dispid: TDispID; out bstr: WideString): HResult;
This method reimplements the IPerPropertyBrowsing.
function GetPropertyString( id: Integer; var S: String): Boolean;
function Get_Cancel: WordBool;
Define property pages here.
function Get_Caption: WideString;
function Get_Cursor: Smallint;
function Get_Default: WordBool;
function Get_DragCursor: Smallint;
function Get_DragMode: TxDragMode;
function Get_Enabled: WordBool;
function Get_Font: Font;
function Get_Visible: WordBool;
procedure InitializeControl;
Protected declarations TButtonX
function SetClientSite(const ClientSite: IOleClientSite): HResult;
This method reimplements the IOleObject.
procedure Set_Cancel(Value: WordBool);
procedure Set_Caption(const Value: WideString);
procedure Set_Cursor(Value: Smallint);
procedure Set_Default(Value: WordBool);
procedure Set_DragCursor(Value: Smallint);
procedure Set_DragMode(Value: TxDragMode);
procedure Set_Enabled(Value: WordBool);
procedure Set_Font(const Value: Font);
procedure Set_Visible(Value: WordBool);
procedure ClickEvent(Sender: TObject);
procedure KeyPressEvent(Sender: TObject; var Key: Char);
FAmbientDispatch : IAmbientDispatch;
FDelphiControl : TButton;
Private declarations
FEvents : IButtonXEvents;
procedure Click;
procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
procedure EventSinkChanged(const EventSink: IUnknown);
function GetDisplayString(dispid: TDispID; out bstr: WideString): HResult;
This method reimplements the IPerPropertyBrowsing.GetDisplayString method because the TActiveXControl implementation has a bug in it. //
function GetPropertyString( id: Integer; var S: String): Boolean;
function Get_Cancel: WordBool;
Define property pages here. Property pages are defined by calling
DefinePropertyPage with the class id of the page. For example,
DefinePropertyPage(Class_ButtonXPage);
function Get_Caption: WideString;
function Get_Cursor: Smallint;
function Get_Default: WordBool;
function Get_DragCursor: Smallint;
function Get_DragMode: TxDragMode;
function Get_Enabled: WordBool;
function Get_Font: Font;
function Get_Visible: WordBool;
procedure InitializeControl;
Protected declarations
TButtonX
function SetClientSite(const ClientSite: IOleClientSite): HResult;
This method reimplements the IOleObject.SetClientSite method, to allow interception of the setting of the Site. The code retrieve the ambient dispatch interface (if any) and store it for future use.
procedure Set_Cancel(Value: WordBool);
procedure Set_Caption(const Value: WideString);
procedure Set_Cursor(Value: Smallint);
procedure Set_Default(Value: WordBool);
procedure Set_DragCursor(Value: Smallint);
procedure Set_DragMode(Value: TxDragMode);
procedure Set_Enabled(Value: WordBool);
procedure Set_Font(const Value: Font);
procedure Set_Visible(Value: WordBool);
procedure ClickEvent(Sender: TObject);
procedure KeyPressEvent(Sender: TObject; var Key: Char);
FAmbientDispatch : IAmbientDispatch;
FDelphiControl : TButton;
Private declarations
FEvents : IButtonXEvents;