Sign in Join
Wiki copytemporary

BGRAControls: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11![](/wiki-images/7/74/Bgracontrols.png)
22
33## Install
44
55Use the [[Online Package Manager]] to get BGRABitmap and BGRAControls.
66
77Notice that you must check only the packages "bgrabitmappack.lpk" and "bgracontrols.lpk" in the Online Package Manager. The other packages are optional and may need third party packages / libraries to work (OpenGL and PascalScript).
88
99### Optional Components
1010
1111Since v4.4 the components TBCDefaultThemeManager, TBCKeyboard and TBCNumericKeyboard are not installed by default to allow Linux users to get a seamless installation with the Online Package Manager not installing third party stuff. If you want these components turn on the "Register unit" in the package options for each file (bcdefaulthememanager.pas, bckeyboard.pas, bcnumerickeyboard.pas) then compile and rebuild Lazarus. On Linux you need to install libxtst-dev and libgl-dev first.
1212
1313### Website
1414
1515BGRABitmap Organization on GitHub: <https://github.com/bgrabitmap/>
1616
1717## BGRA Controls
1818
1919BGRA Controls is a set of graphical UI elements that you can use with Lazarus LCL applications. Under Linux you need to have installed libxtst-dev and libgl-dev.
2020
2121### TBCButton
2222
2323![](/wiki-images/8/8a/Bcbutton.png)
2424
2525A button control that can be styled through properties for each state like StateClicked, StateHover, StateNormal with settings like gradients, border and text with shadows. You can assign an already made style through the property AssignStyle.
2626
2727### TBCButtonFocus
2828
2929Like TBCButton but it supports focus like normal TButton.
3030
3131### TBCGameGrid
3232
3333![](/wiki-images/6/62/Bcgamegrid.png)
3434
3535A grid with custom width and height of items and any number of horizontal and vertical cells that can be drawn with BGRABitmap directly with the OnRenderControl event.
3636
3737### TBCImageButton
3838
3939![](/wiki-images/2/29/Samplebgraimagebutton.png)
4040
4141![](/wiki-images/b/b9/Samplebgraimagebuttonalpha.png)
4242
4343A button control that can be styled with one image file, containing the drawing for each state Normal, Hovered, Active and Disabled. It supports 9-slice scaling feature. It supports a nice fading animation that can be turned on.
4444
4545### TBCXButton
4646
4747![](/wiki-images/0/02/Bcxbutton.png)
4848
4949A button control that can be styled by code with the OnRenderControl event. Or even better create your own child control inheriting from this class.
5050
5151### TBCLabel
5252
5353![](/wiki-images/e/e5/Bclabel.png)
5454
5555A label control that can be styled through properties, it supports shadow, custom borders and background.
5656
5757### TBCMaterialDesignButton
5858
5959A button control that has an animation effect according to Google Material Design guidelines. It supports custom color for background and for the circle animation, also you can customize the shadow.
6060
6161### TBCPanel
6262
6363![](/wiki-images/2/28/Bcpanel.png)
6464
6565A panel control that can be styled through properties. You can assign an already made style through the property AssignStyle.
6666
6767### TBCRadialProgressBar
6868
6969A progress bar with radial style. You can set the color and text properties as you like.
7070
7171### TBCToolBar
7272
7373A TToolBar with an event OnRedraw to paint it using BGRABitmap. It supports also the default OnPaintButton to customize the buttons drawing. By default it comes with a Windows 7 like explorer toolbar style.
7474
7575### TBCTrackBarUpdown
7676
7777A control to input numeric values with works like a trackbar and a spinedit both in one control.
7878
7979### TBGRAFlashProgressBar
8080
8181![](/wiki-images/0/0b/BC-Bgraflashprogressbar.png)
8282
8383A progress bar with a default style inspired in the old Flash Player Setup for Windows progress dialog. You can change the color property to have different styles and also you can use the event OnRedraw to paint custom styles on it like text or override the entire default drawing.
8484
8585### TBGRAGraphicControl
8686
8787Is like a paintbox. You can draw with transparency with this control using the OnRedraw event.
8888
8989### TBGRAImageList
9090
9191An image list that supports alpha in all supported platforms.
9292
9393How app looks with TImageList (with transparent icons):
9494
9595![](/wiki-images/a/ac/Before-TImageList.png)
9696
9797How app looks with BGRAImageList:
9898
9999![](/wiki-images/1/1f/After-TBGRAImageList.png)
100100
101101### TBGRASVGImageList
102102
103103It is located in the BGRA Themes tab.
104104
105-<img src="bgrasvgimagelist_edit.png" title="bgrasvgimagelist_edit.png" width="450" />
105+![](/wiki-images/6/63/Bgrasvgimagelist_edit.png)
106106
107107In its properties, one can define the size and a target raster image list (TImageList or TBGRAImageList):
108108
109-<img src="bgrasvgimagelist_prop.png" title="bgrasvgimagelist_prop.png" width="350" />
109+![](/wiki-images/f/f4/Bgrasvgimagelist_prop.png)
110110
111111This will automatically populate the target image list (here on MacOS, it provides the double sized icons for Retina):
112112
113-<img src="targetimagelist_edit.png" title="targetimagelist_edit.png" width="350" />
113+![](/wiki-images/8/83/Targetimagelist_edit.png)
114114
115115### TBGRAImageManipulation
116116
117117![](/wiki-images/6/60/Bgraimagemanipulation.jpg)
118118
119119A tool to manipulate pictures, see the demo that shows all the capability that comes with it.
120120
121121### TBGRAKnob
122122
123123![](/wiki-images/3/39/BC-Bgraknob.png)
124124
125125A knob that can be styled through properties.
126126
127127### TBGRAResizeSpeedButton
128128
129129A speed button that can resize the glyph to fit in the entire control.
130130
131131### TBGRAShape
132132
133133![](/wiki-images/6/61/Samplebgrashape.png)
134134
135135A control with configurable shapes like polygon and ellipse that can be filled with gradients and can have custom borders and many other visual settings.
136136
137137### TBGRASpeedButton
138138
139139![](/wiki-images/e/e9/BGRASpeedButton.png)
140140
141141A speed button that in GTK and GTK2 provides BGRABitmap powered transparency to the glyph.
142142
143143### TBGRASpriteAnimation
144144
145145![](/wiki-images/8/88/Bgraspriteanimation.png)
146146
147147A component that can be used as image viewer or animation viewer, supports the loading of gif files.
148148
149149### TBGRAVirtualScreen
150150
151151Is like a panel. You can draw this control using the OnRedraw event.
152152
153153### TDTAnalogClock
154154
155155A clock.
156156
157157### TDTAnalogGauge
158158
159159A gauge.
160160
161161### TDTThemedClock
162162
163163Another clock.
164164
165165### TDTThemedGauge
166166
167167Another gauge.
168168
169169### TPSImport_BGRAPascalScript
170170
171171A component to load BGRABitmap pascal script utilities.
172172
173173## BGRA Custom Drawn
174174
175175BGRA Custom Drawn is a set of controls inherited from Custom Drawn. These come with a default dark style that is like Photoshop.
176176
177177### TBCDButton
178178
179179A button control that is styled with TBGRADrawer.
180180
181181### TBCDEdit
182182
183183An edit control that is styled with TBGRADrawer.
184184
185185### TBCDStaticText
186186
187187A label control that is styled with TBGRADrawer.
188188
189189### TBCDProgressBar
190190
191191A progress bar control that is styled with TBGRADrawer.
192192
193193### TBCDSpinEdit
194194
195195A spin edit control that is styled with TBGRADrawer.
196196
197197### TBCDCheckBox
198198
199199A check box control that is styled with TBGRADrawer.
200200
201201### TBCRadioButton
202202
203203A radio button that is styled with TBGRADrawer.
204204
205205## Sample code
206206
207207BGRA Controls comes with nice demos to show how to use the stuff and extra things you can use in your own projects.
208208
209209### Pascal Script Library
210210
211211Putting BGRABitmap methods into a .dll with c#, java and pascal headers.
212212
213213### BGRA Ribbon Custom
214214
215215How to create a fully themed window using the controls to achieve a Ribbon like application.
216216
217217### Tests
218218
219219There are test for analog controls (clock and gauge), BC prefixed controls, BGRA prefixed controls, BGRA Custom Drawn controls, how to use Pascal Script and BGRABitmap, bgrascript or how to create your own scripting solution with BGRABitmap.
220220
221221### Tests Extra
222222
223223![](/wiki-images/0/0c/Game_maze.png)
224224
225225![](/wiki-images/f/f8/Game_puzzle.png)
226226
227227![](/wiki-images/4/4e/Customdrawnwindows7.png)
228228
229229![](/wiki-images/9/9d/Slicescaledtachart.png)
230230
231231These are extra tests like how to use fading effect, an fpGUI theme, games like maze and puzzle, how we created the material design animation, pix2svg or how to convert a small picture to svg using hexagons, rectangles and ellipses, plugins or how to load .dlls and use into a TBGRAVirtualScreen, rain effect, shadow effect, 9-slice-scaling with Custom Drawn or how to theme with bitmaps an application to look like Windows themes and 9-slice-scaling with charts.
232232
233233## Other units
234234
235235These units come with BGRA Controls and contains more functionality that is sometimes used with the controls, sometimes not but are usefull in some way. Some are listed here, others you can see linked directly with any control like bcrtti, bcstylesform, bctools and bctypes.
236236
237237### BCEffect
238238
239239Fading effect with BGRABitmap.
240240
241241### BCFilters
242242
243243A set of pixel filters to use with BGRABitmap.
244244
245245### BGRAScript
246246
247247Scripting with BGRABitmap, see test project.
248248
249249## Related Articles
250250
251251[[BGRASpriteAnimation]] - Usage of the sprite animation component.
252252
253253[[uE Controls]] - Other controls developed with BGRABitmap.
254254
255255[[BGRABitmap]] - The library used to create this controls.
256256
257257[[LazPaint]] - A paint program developed with Lazarus and BGRABitmap.
258258
259259---
260260*From the Free Pascal wiki, page "BGRAControls", as it stood on 2023-08-13 after a change by Alextpp, 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](/wiki-contact).*
261261Category: BGRAControls
262262Category: Components
263263Category: Graphics

Back to history