User Tools

Site Tools


en:projects:sgjcontrols

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:projects:sgjcontrols [2023/04/10 20:15] – [SGJ Controls] sgjen:projects:sgjcontrols [2023/04/12 18:10] (current) – [TSGJPanel] sgj
Line 2: Line 2:
  
 Visual Controls for Delphi and Lazarus Visual Controls for Delphi and Lazarus
 +
 +GitHub: https://github.com/sgjps/SGJ_Controls
 +
 +Web: https://www.sgjps.com/en/projects/sgj_controls
  
 ===== TSGJButton ===== ===== TSGJButton =====
 + 
 +Button with color styling and images display. 
  
 +On Lazarus it uses bgrabitmap.
 +
 +On Delphi it uses Direct2D on supported Delphi and Windows version and Canvas on older versions.
 +
 +Property:
 +  * Caption - string, button  text
 +  * Description - string, second line text (only if ShowDescription set to true) 
 +  * ColorNormal - TColor, button color
 +  * ColorHover  - TColor, color when mouse move
 +  * Images      - TImagelist
 +  * ImageIndex  - image index from imagelist
 +  * ShowDescription - boolean, if true then show second line with description
 +  * FontDescription - font for description
 +  * ShowBorder      - if true then show border
 +  * BorderColor     - TColor, border color
 +  * RoundedCorners  - boolean, enable rounded corners
 +  * TitleOnCenter   - Move title to center(only with ShowDescription=false and no images)
 ===== TSGJToogleButton ===== ===== TSGJToogleButton =====
  
 +Toogle button, modern checkbox replacement.
 +
 +
 +Default compile configuration
 +<code delphi>
 +{$IFDEF FPC}                       //Lazarus / FPC
 +  {$DEFINE SGJCTRL_W_BGRA}         //BGRABitmap draw only
 +//{$DEFINE SGJCTRL_W_Canvas}       //Canvas draw only
 +//{$DEFINE SGJCTRL_W_GDIPlUS}      //GDI PLUS draw only(and only on Windows)
 +{$ELSE}                            //Delphi:
 +//{$DEFINE SGJCTRL_W_Canvas}       //Canvas draw only
 +{$IF CompilerVersion >= 21}
 + {$DEFINE SGJCTRL_W_D2D}    //Direct2D
 +{$IFEND}
 +  {$DEFINE SGJCTRL_W_GDIPlUS}      //GDI PLUS
 +{$ENDIF}
 +</code>
 +
 +On Delphi Direct2D is switched to Canvas if not supported. If enable Direct2D with GDI+, then switched D2D to GDI+ when not supported.
 +
 +<code>
 +Property:
 +ButtonColor             :TColor
 +ButtonCheckedColor      :TColor
 +ButtonUnCheckedColor    :TColor
 +Caption                 :String
 +TextBeforeButton        :Boolean
 +Checked                 :Boolean
 +</code>
 ===== TSGJLinkLabel ===== ===== TSGJLinkLabel =====
  
Line 14: 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     - string, if set, then panel display Header like groupbox.
   * BorderColor - TColor, border color   * BorderColor - TColor, border color
-  * ShowBorder - boolean, if true then show border+  * ShowBorder  - boolean, if true then show border
  
 +===== Demo preview =====
 {{ :en:projects:sgjcontrols.jpg?400 |}} {{ :en:projects:sgjcontrols.jpg?400 |}}
en/projects/sgjcontrols.1681150517.txt.gz · Last modified: 2023/04/10 20:15 by sgj

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki