Class TRichButton (unit RichButton) |
Inherits from
TCustomControl
constructor Create(AOwner: TComponent);
procedure AlignControls(AControl: TControl; var Rect: TRect);
remove the non-work areas from our work rectangle
procedure CreateParams(var Params: TCreateParams);
modified from TTransBitmapuse the Paragraph of the RichEdit
procedure CreateWnd;
procedure Paint;
procedure Resize;
procedure CMColorChanged(var Message: TMessage);
procedure CMCtl3DChanged(var Message: TMessage);
set the RichEdit to the same font
procedure CMFontChanged(var Message: TMessage);
set the RichEdit to the same color
procedure CMIsToolControl(var Message: TMessage);
procedure CMTextChanged(var Message: TMessage);
show the name of the control
function GetLines:TStrings;
modified from TTransBitmapinvalidate the button for repainting
function GetWorkRect:TRect;
internal routinesif they released the mouse button over the control, call the OnClick() event
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure MouseMove(Shift: TShiftState; X, Y: Integer);
invalidate the button for repainting
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
invalidate the button for repainting
procedure ReadData(Reader: TReader);
modified from TTransBitmap
procedure SetAlignment(Value: TAlignment);
draw the inner bevel
procedure SetAllowDown(Value:Boolean);
procedure SetBevelInner(Value: TPanelBevel);
modified from TTransBitmapinvalidate the button for repainting
procedure SetBevelOuter(Value: TPanelBevel);
procedure SetBevelWidth(Value: TBevelWidth);
procedure SetBorderStyle(Value: TBorderStyle);
procedure SetBorderWidth(Value: TBorderWidth);
procedure SetFocus(Value:Boolean);
procedure SetFocusColor(Value:TColor);
modified from TTransBitmapinvalidate the button for repainting
procedure SetFocusWidth(Value:TWidth);
modified from TTransBitmapinvalidate the button for repainting
procedure SetLines(Value:TStrings);
get the richedit's lines
procedure SetState(Value:TRichButtonState);
set the richedit's lines
procedure WMSize(var Message: TWMSize);
change the size of the RTF control
property Align :
property Alignment : TAlignment
property AllowDown : Boolean
property BevelInner : TPanelBevel
property BevelOuter : TPanelBevel
property BevelWidth : TBevelWidth
property BorderStyle : TBorderStyle
property BorderWidth : TBorderWidth
property Color :
property Ctl3D :
property DragCursor :
property DragMode :
property Enabled :
property Focus : Boolean
property FocusColor : TColor
property FocusWidth : TWidth
property Font :
property Height :
property Lines : TStrings
property Locked : Boolean
property ParentColor :
property ParentCtl3D :
property ParentFont :
property ParentShowHint :
property PopupMenu :
property ShowHint :
property State : TRichButtonState
property TabOrder :
property TabStop :
property Visible :
property Width :
property DefAttributes : TTextAttributes
property Paragraph : TParaAttributes
property SelAttributes : TTextAttributes
properties stored in TRichEdit
property FullRepaint : Boolean
event OnClick :
event OnDblClick :
event OnDragDrop :
event OnDragOver :
event OnEndDrag :
event OnEnter :
event OnExit :
event OnMouseDown :
event OnMouseMove :
event OnMouseUp :
event OnResize : TNotifyEvent
event OnStartDrag :
FAlignment : TAlignment;
FAllowDown : Boolean;
storage for properties
FBevelInner : TPanelBevel;
FBevelOuter : TPanelBevel;
FBevelWidth : TBevelWidth;
FBorderStyle : TBorderStyle;
FBorderWidth : TBorderWidth;
FDefAttributes : TTextAttributes;
FFocus : Boolean;
FFocusColor : TColor;
FFocusWidth : TWidth;
FFullRepaint : Boolean;
FLocked : Boolean;
FOnResize : TNotifyEvent;
FParagraph : TParaAttributes;
FSelAttributes : TTextAttributes;
FState : TRichButtonState;
HasFocus : Boolean;
MouseCaught : Boolean;
variables used internally
OrigState : TRichButtonState;
RichEdit : TRichEdit;
constructor Create(AOwner: TComponent);
procedure AlignControls(AControl: TControl; var Rect: TRect);
remove the non-work areas from our work rectangle
procedure CreateParams(var Params: TCreateParams);
modified from TTransBitmap
use the Paragraph of the RichEdit
procedure CreateWnd;
procedure Paint;
procedure Resize;
procedure CMColorChanged(var Message: TMessage);
procedure CMCtl3DChanged(var Message: TMessage);
set the RichEdit to the same font
procedure CMFontChanged(var Message: TMessage);
set the RichEdit to the same color
procedure CMIsToolControl(var Message: TMessage);
procedure CMTextChanged(var Message: TMessage);
show the name of the control
function GetLines:TStrings;
modified from TTransBitmap
invalidate the button for repainting
function GetWorkRect:TRect;
internal routines
if they released the mouse button over the control, call the OnClick() event
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure MouseMove(Shift: TShiftState; X, Y: Integer);
invalidate the button for repainting
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
invalidate the button for repainting
procedure ReadData(Reader: TReader);
modified from TTransBitmap
procedure SetAlignment(Value: TAlignment);
draw the inner bevel
procedure SetAllowDown(Value:Boolean);
procedure SetBevelInner(Value: TPanelBevel);
modified from TTransBitmap
invalidate the button for repainting
procedure SetBevelOuter(Value: TPanelBevel);
procedure SetBevelWidth(Value: TBevelWidth);
procedure SetBorderStyle(Value: TBorderStyle);
procedure SetBorderWidth(Value: TBorderWidth);
procedure SetFocus(Value:Boolean);
procedure SetFocusColor(Value:TColor);
modified from TTransBitmap
invalidate the button for repainting
procedure SetFocusWidth(Value:TWidth);
modified from TTransBitmap
invalidate the button for repainting
procedure SetLines(Value:TStrings);
get the richedit's lines
procedure SetState(Value:TRichButtonState);
set the richedit's lines
procedure WMSize(var Message: TWMSize);
change the size of the RTF control
property Align :
property Alignment : TAlignment
property AllowDown : Boolean
property BevelInner : TPanelBevel
property BevelOuter : TPanelBevel
property BevelWidth : TBevelWidth
property BorderStyle : TBorderStyle
property BorderWidth : TBorderWidth
property Color :
property Ctl3D :
property DragCursor :
property DragMode :
property Enabled :
property Focus : Boolean
property FocusColor : TColor
property FocusWidth : TWidth
property Font :
property Height :
property Lines : TStrings
property Locked : Boolean
property ParentColor :
property ParentCtl3D :
property ParentFont :
property ParentShowHint :
property PopupMenu :
property ShowHint :
property State : TRichButtonState
property TabOrder :
property TabStop :
property Visible :
property Width :
property DefAttributes : TTextAttributes
property Paragraph : TParaAttributes
property SelAttributes : TTextAttributes
properties stored in TRichEdit
property FullRepaint : Boolean
event OnClick :
event OnDblClick :
event OnDragDrop :
event OnDragOver :
event OnEndDrag :
event OnEnter :
event OnExit :
event OnMouseDown :
event OnMouseMove :
event OnMouseUp :
event OnResize : TNotifyEvent
event OnStartDrag :
FAlignment : TAlignment;
FAllowDown : Boolean;
storage for properties
FBevelInner : TPanelBevel;
FBevelOuter : TPanelBevel;
FBevelWidth : TBevelWidth;
FBorderStyle : TBorderStyle;
FBorderWidth : TBorderWidth;
FDefAttributes : TTextAttributes;
FFocus : Boolean;
FFocusColor : TColor;
FFocusWidth : TWidth;
FFullRepaint : Boolean;
FLocked : Boolean;
FOnResize : TNotifyEvent;
FParagraph : TParaAttributes;
FSelAttributes : TTextAttributes;
FState : TRichButtonState;
HasFocus : Boolean;
MouseCaught : Boolean;
variables used internally
OrigState : TRichButtonState;
RichEdit : TRichEdit;