en:projects:sgjcontrols
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:projects:sgjcontrols [2023/04/10 20:21] – [TSGJButton] sgj | en:projects:sgjcontrols [2023/04/12 18:10] (current) – [TSGJPanel] sgj | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== TSGJButton ===== | ===== TSGJButton ===== | ||
- | Button with color styling and images display. | + | Button with color styling and images display. |
- | ButtonSettings | + | On Lazarus it uses bgrabitmap. |
- | * Title | + | |
- | * Description | + | On Delphi it uses Direct2D on supported Delphi and Windows version and Canvas on older versions. |
- | * ColorNormal | + | |
- | * ColorHover | + | Property: |
- | * Images | + | * Caption - string, button |
- | * ImageIndex | + | * Description |
- | * ShowDescription | + | * ColorNormal |
- | * FontDescription | + | * ColorHover |
- | * ShowBorder | + | * Images |
- | * BorderColor | + | * ImageIndex |
- | * BorderColor | + | * ShowDescription |
- | * RoundedCorners | + | * FontDescription |
- | * TitleOnCenter | + | * ShowBorder |
+ | * BorderColor | ||
+ | * RoundedCorners | ||
+ | * TitleOnCenter | ||
===== TSGJToogleButton ===== | ===== TSGJToogleButton ===== | ||
+ | Toogle button, modern checkbox replacement. | ||
+ | |||
+ | |||
+ | Default compile configuration | ||
+ | <code delphi> | ||
+ | {$IFDEF FPC} // | ||
+ | {$DEFINE SGJCTRL_W_BGRA} | ||
+ | //{$DEFINE SGJCTRL_W_Canvas} | ||
+ | //{$DEFINE SGJCTRL_W_GDIPlUS} | ||
+ | {$ELSE} | ||
+ | //{$DEFINE SGJCTRL_W_Canvas} | ||
+ | {$IF CompilerVersion >= 21} | ||
+ | {$DEFINE SGJCTRL_W_D2D} | ||
+ | {$IFEND} | ||
+ | {$DEFINE SGJCTRL_W_GDIPlUS} | ||
+ | {$ENDIF} | ||
+ | </ | ||
+ | |||
+ | On Delphi Direct2D is switched to Canvas if not supported. If enable Direct2D with GDI+, then switched D2D to GDI+ when not supported. | ||
+ | |||
+ | < | ||
+ | Property: | ||
+ | ButtonColor | ||
+ | ButtonCheckedColor | ||
+ | ButtonUnCheckedColor | ||
+ | Caption | ||
+ | TextBeforeButton | ||
+ | Checked | ||
+ | </ | ||
===== TSGJLinkLabel ===== | ===== TSGJLinkLabel ===== | ||
Line 34: | Line 66: | ||
Panel component with customized border. | Panel component with customized border. | ||
Property: | Property: | ||
- | * Title - string, if set, then panel display Header like groupbox. | + | * Caption |
* BorderColor - TColor, border color | * BorderColor - TColor, border color | ||
- | * ShowBorder - boolean, if true then show border | + | * ShowBorder |
===== Demo preview ===== | ===== Demo preview ===== | ||
{{ : | {{ : |
en/projects/sgjcontrols.1681150912.txt.gz · Last modified: 2023/04/10 20:21 by sgj