Eye-Candy Controls

From Free Pascal wiki
Revision as of 00:28, 5 August 2015 by Blaazen (talk | contribs)
Jump to navigationJump to search

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 everywhere, 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. All screenshots are taken from KDE4 (Lazarus+Qt).

Visual

TECBevel

tecbevel.png

TECLink

teclink.png

TECImageMenu

Vertical menu with images. Similar component is frequently used in KDE4 applications.

tecimagemenu.png

TECImageMenu makes properties published only.

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

TECImageMenu can be controlled by mouse, by keyboard or by code.

Mouse

Simply left-click on menu item.

Middle-click or right-click selects an item but does not click.

Mouse wheel moves the selection but does not click.

Keyboard

Space nad Enter: click on the selected item.

Arrow Up, Arrow Down, Page Up, Page Down, Home and End: moves the selection but does not click.

Acceleration key (Alt + Key) selects and clicks the relevant item (menu doesn't need to be focused)..

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

An advanced ruler.

tecruler.png

TECRuler cannot have focus.

TECRuler just displays scale. It can have fixed or movable pointer optionally.

TECRadioGroup

tecradiogroup.png

TECCheckGroup

teccheckgroup.png

TECConfCurve

tecconfcurve.png

TECScheme

tecscheme.png

Non-visual components

TECSpinController

tecspincontrollericon.png

TECTimer

tectimericon.png

Other parts of EC-Controls

Class TECScale

Unit ECTypes