Sign in Join
Wiki copytemporary

Material Design

Material Design

Material Design Components for Lazarus, painted with BGRABitmap. Licensed as LGPL v3. 2018 by Lainz.

Download

MDButton

This control can act as a normal button, toggle, toggle group, checkbox and radiobutton.

Getting Started

Drop a MDButton from the Material Design component pallete. By default it has no animation and the colors of a basic Material Design button. You can set the properties you need, listed below.

Properties

Kind

You can use this button with other control functionality like checkbox and radiobutton.

CheckBox mode

With this mode, you can select (Checked: true), unselect, invert selection and get selected controls in a group. It's better than you group in a regular TPanel all checkbox buttons.

RadioButton mode

Whit this mode, you can select (Checked: true) only one button at a time. You can get the selected control with the method GetSelected explained below. It's better than you group in a regular TPanel all radio buttons.

Toggle mode

Like CheckBox mode, but no glyph is added.

Toggle Group mode

Like RadioButton mode, but no glyph is added.

Tab mode

You can use it like a tab button, to choose only one at a time, and has an animation when you select it.

Methods

These methods works when a set of MDButton are grouped (better on a Panel). Just call the method on any of the controls in the group. * SelectAll: set all controls Checked property to true. Used when "Kind" property is toggle group or checkbox. * UnselectAll: set all controls Checked property to false. Used when "Kind" property is toggle group or checkbox. * InvertSelection: set all controls Checked property to the opposite. Used when "Kind" property is toggle group or checkbox. * GetSelected: returns a TStringList containing the caption and the MDButton (Objects) that has the property Checked set to true.

Globals


From the Free Pascal wiki, page "Material Design", as it stood on 2020-05-06 after a change by FTurtle, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.