Difference between revisions of "Eye-Candy Controls"

From Lazarus wiki
Jump to navigationJump to search
Line 127: Line 127:
  
 
Left-click on Slider area (out of Knob) will move the knob by PageSize (or less, if mouse cursor is nearer).
 
Left-click on Slider area (out of Knob) will move the knob by PageSize (or less, if mouse cursor is nearer).
 +
 
Double-click or Middle-click will move the knob immediately to the mouse cursor (or to the Min/Max, if click is done out of groove and scale area).
 
Double-click or Middle-click will move the knob immediately to the mouse cursor (or to the Min/Max, if click is done out of groove and scale area).
 +
 
Left-click on the knob and holding the left-mouse button down will capture mouse and knob can be moved even if the mouse-cursor leaves the area of the slider.
 
Left-click on the knob and holding the left-mouse button down will capture mouse and knob can be moved even if the mouse-cursor leaves the area of the slider.
 +
 
Mouse wheel moves knob up/down regardless of the Reversed property. In case of horizontal slider rolling up/down moves knob to the left/right, again, regardless of the Reversed property.
 
Mouse wheel moves knob up/down regardless of the Reversed property. In case of horizontal slider rolling up/down moves knob to the left/right, again, regardless of the Reversed property.
 +
 
The increment is:
 
The increment is:
Alone mouse wheel: Increment*Mouse.WheelScrollLines
+
 
 +
Mouse wheel: Increment*Mouse.WheelScrollLines
 +
 
 
Ctrl + mouse wheel: Increment.
 
Ctrl + mouse wheel: Increment.
  
===== Keyboard =====
+
===== Keyboard =====
  
 
Space: moves knob to the middle of the groove or to the ProgressMiddlePos in case of ProgressFromMiddle = True
 
Space: moves knob to the middle of the groove or to the ProgressMiddlePos in case of ProgressFromMiddle = True
 +
 
0-9: moves the knob to position which is the integer multiplier of the PageSize (i.e. 0, 10, ..., 90 for PageSize = 10).
 
0-9: moves the knob to position which is the integer multiplier of the PageSize (i.e. 0, 10, ..., 90 for PageSize = 10).
 +
 
PgUp: decreases Position by PageSize
 
PgUp: decreases Position by PageSize
 +
 
PgUp: increases Position by PageSize
 
PgUp: increases Position by PageSize
 +
 
Home: moves the Knob to Min
 
Home: moves the Knob to Min
 +
 
End: moves the Knob to Max
 
End: moves the Knob to Max
 +
 
+: increases Position by Increment
 
+: increases Position by Increment
 +
 
-: decreases Position by Increment
 
-: decreases Position by Increment
 +
 
Ctrl + ArrowUp: decreases* Position by Increment
 
Ctrl + ArrowUp: decreases* Position by Increment
 +
 
Ctrl + ArrowLeft: decreases* Position by Increment
 
Ctrl + ArrowLeft: decreases* Position by Increment
 +
 
Ctrl + ArrowDown: increases* Position by Increment
 
Ctrl + ArrowDown: increases* Position by Increment
 +
 
Ctrl + ArrowRight: increases* Position by Increment
 
Ctrl + ArrowRight: increases* Position by Increment
 +
 +
 
<nowiki>*)</nowiki> valid for Reversed = False. When Reversed = True works oppositely.  
 
<nowiki>*)</nowiki> valid for Reversed = False. When Reversed = True works oppositely.  
  
Line 157: Line 176:
  
 
==== TECProgressBar ====
 
==== TECProgressBar ====
 +
 +
An advanced alternative to TProgressBar.
  
 
[[File:tecprogressbar.png]]
 
[[File:tecprogressbar.png]]
 +
 +
TECProgressBar is based on double precision variables. TECProgressBar cannot have focus. It can be controlled by code only.
  
 
==== TECPositionBar ====
 
==== TECPositionBar ====

Revision as of 00:14, 5 August 2015

Overview

About

Eye Candy Controls (a.k.a. ECControls) are set of visual controls written for Lazarus. Their design is based on Themes, therefore they look is very native, no matter what widgetset you use.

License

GNU Lesser General Public License 2.0 with linking exception (a.k.a. Modified LGPL). Each file of EC-Controls contains license header. Also, files COPYING.modifiedLGPL.txt and COPYING.LGPL.txt are bundled to each archive.

Author

All components are written by Blaazen. Copyright notice and real name are mentioned in header of each file of EC-Controls. You can contact author on Lazarus Forum (nickname: Blaazen) in any thread about EC-Controls. If you are logged to forum, you can get e-mail of author or send private message.

Install

Download EC-Controls

SourceForge: https://sourceforge.net/projects/eccontrols/

UltraShare: http://ultrashare.net/hosting/fl/4a5dee7961 (direct link to 0.9.2.12 released 29-th July 2015)

UltraShare is alternative because SourceForge is blocked in some countries. If you need link to the latest release, search in section Third Party on Lazarus Forum.

Install EC-Controls

Open menu Package/Open package File (*.lpk) ... and select file eccontrols.lpk. Click Compile and then Use >> Install. Lazarus will ask you "Do you want to rebuild Lazarus now?". "Yes" will install the package.

Components

EC-Controls are installed to the tab EC-C on the Lazarus component palette.

eccpalette.png

Components below are listed in order of their appearance on the component palette.

Visual

TECBevel

tecbevel.png

TECLink

teclink.png

TECImageMenu

tecimagemenu.png

TECSpinBtns

tecspinbtns.png

TECSpinEdit

tecspinedit.png

TECSwitch

tecswitch.png

An alternative to TCheckBox. Similar component exists in GTk3.

TECSwitch can have focus and can be reached by Tab key (when TabStop = True, which is default). TECSwitch can be controlled by mouse, by keyboard or by code.

Mouse

Left-click on switch area (out of knob) will change the State*.

Left-click on the knob and holding the left-mouse button down will capture mouse and knob can be moved even if the mouse-cursor leaves the area of the switch.

Keyboard

Space or Enter changes the State* (only when focused).

Acceleration key (Alt + Key) changes the State* (doesn't need to be focused).

Code

Simply by assigning any State* or Checked property:

Checked := True; //False
State := cbChecked; //cbGrayed, cbUnchecked

*) Property State is always changed from checked to unchecked, from grayed to unchecked or from unchecked to checked.

TECSpeedBtn

tecspeedbtn.png

TECEditBtn

teceditbtn.png

TECColorBtn

teccolorbtn.png

TECComboBtn

teccombobtn.png

TECColorCombo

teccolorcombo.png

TECHeader

techeader.png

TECCheckListBox

tecchecklistbox.png

TECSlider

An advanced alternative to TTrackBar.

tecslider.png

TECSlider can have focus and can be reached by Tab key (when TabStop = True, which is default).

TECSlider is based on double precision variables. TECSlider can be controlled by mouse, by keyboard or by code.

Mouse

Left-click on Slider area (out of Knob) will move the knob by PageSize (or less, if mouse cursor is nearer).

Double-click or Middle-click will move the knob immediately to the mouse cursor (or to the Min/Max, if click is done out of groove and scale area).

Left-click on the knob and holding the left-mouse button down will capture mouse and knob can be moved even if the mouse-cursor leaves the area of the slider.

Mouse wheel moves knob up/down regardless of the Reversed property. In case of horizontal slider rolling up/down moves knob to the left/right, again, regardless of the Reversed property.

The increment is:

Mouse wheel: Increment*Mouse.WheelScrollLines

Ctrl + mouse wheel: Increment.

Keyboard

Space: moves knob to the middle of the groove or to the ProgressMiddlePos in case of ProgressFromMiddle = True

0-9: moves the knob to position which is the integer multiplier of the PageSize (i.e. 0, 10, ..., 90 for PageSize = 10).

PgUp: decreases Position by PageSize

PgUp: increases Position by PageSize

Home: moves the Knob to Min

End: moves the Knob to Max

+: increases Position by Increment

-: decreases Position by Increment

Ctrl + ArrowUp: decreases* Position by Increment

Ctrl + ArrowLeft: decreases* Position by Increment

Ctrl + ArrowDown: increases* Position by Increment

Ctrl + ArrowRight: increases* Position by Increment


*) valid for Reversed = False. When Reversed = True works oppositely.

Code

Simply by assigning any floating-point value to property Position:

Position := 10.5; 

If the value is out of range (lesser than Min or greater than Max) then Position will be Min or Max.

TECProgressBar

An advanced alternative to TProgressBar.

tecprogressbar.png

TECProgressBar is based on double precision variables. TECProgressBar cannot have focus. It can be controlled by code only.

TECPositionBar

tecpositionbar.png

TECSpinPosition

tecspinposition.png

TECRuler

tecruler.png

TECRadioGroup

tecradiogroup.png

TECCheckGroup

teccheckgroup.png

TECConfCurve

tecconfcurve.png

TECScheme

tecscheme.png

Non-visual components

TECSpinController

tecspincontrollericon.png

TECTimer

tectimericon.png