Saturday, August 22, 2020
TColorButton Delphi Component Source Code
TColorButton Delphi Component Source Code The foundation shade of aà TButtonà is constrained by Windows,â not Delphi. TButton is a straightforward wrapper around the standard Windows catch, and Windows doesn't permit it to be shaded aside from by picking the hues in Control Panel.â This implies you can not set the foundation shade of a TButton, nor you can change the foundation shade of TBitBtn or TSpeedButton. Since Windows demands doing the foundation shading with clBtnFace, the best way to transform it is to draw the catch yourself by making a proprietor drawn catch part. TColorButton Source Code The TColorButton adds three new properties to the standard TButton: BackColorà -Specifies the foundation shade of the buttonForeColorà -Specifies the shade of the catch content. Note that this abrogates the Font.Color propertyHoverColorà -Specifies the shading used to paint the catches foundation when the mouse floats over the catch. Heres how to set shading related properties of the TColorButton at runtime: ColorButton1.BackColor : clOlive;/foundation ColorButton1.ForeColor : clYelow;/content ColorButton1.HoverColor : clNavy;/mouse over Introducing Into a Component Palette The TColorButton comesâ asâ a single unit record with the .PAS document expansion. In the wake of downloading the part, you have to introduce the source segment into a current bundle.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment