Sign in Join
Wiki copytemporary

NiceSideBar: what changed

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

OldNewLine
11![](/wiki-images/7/75/Nicesidebar.png)
22
33The following text is based on the *readme.html* file which is included in the *NiceSideBar* installation directory. It is written by the original author of the component, Priyatna. The text was also published on the author's web site which, however, is not available any more.
44
55## Introduction
66
77**NiceSideBar** is a visual component for Delphi and for Lazarus which can be used as a menu. It mimics a side menu usually used in web sites. It has a flat design and is highly customizable. It supports two menu levels (menu and sub menu). Each menu can have a glyph that is supplied by an image list. It has hover state effect too.
88
99## Version History
1010
1111### Version 2.0
1212
1313Released: June 2023
1414
1515- Lazarus support
1616- Cross-platform: Win32/64, Linux (gtk2, gtk3, qt, qt5, qt6), macOS (cocoa)
1717- High-dpi support in the Lazarus version
1818
1919### Version 1.2
2020
2121Released: January 12, 2008
2222
2323- Added properties to items and subitems: Enabled, Visible, ItemEnabled, ItemVisible
2424- Added properties: disabled colors, disabled images
2525- Keyboard control: PgUp, PgDown, Up and Down arrows
2626- Reported bugs fixed
2727
2828### Version 1.1
2929
3030Released: June 28, 2007
3131
3232- Reported bugs fixed
3333
3434### Version 1.0
3535
3636Released: May 26th, 2007
3737
3838- Initial Release
3939
4040## License
4141
4242This library is released under **Mozilla Public License**. You can use it in your freeware, shareware or commercial softwares. You can send your modification to me, and if I decide to include it in the main distribution, I will add your name as a contributor. You can read full licensing information in the file *License.txt* in the *NiceSideBar* installation folder.
4343
4444## Download and installation
4545
4646The easiest way for Lazarus users is to get the package from the [[Online Package Manager]] (OPM) which is installed with newer Lazarus versions. Simply open its menu item, check "NiceSideBar" in the tree list, and click "Install". Then OPM will take care of the download and the installation.
4747
4848Since the OPM version may not always be up-to-date, you can also download the development version from the "Lazarus Component and Code Repository" (CCR) where a zipped snapshot is provided (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/nicegrid/). Alternatively, if you use SVN you can use the following SVN command in a console window:
4949
50-`svn checkout `[`svn://svn.code.sf.net/p/lazarus-ccr/svn/components/nicesidebar`](svn://svn.code.sf.net/p/lazarus-ccr/svn/components/nicesidebar)` nicesidebar`
50+```text
51+svn checkout svn://svn.code.sf.net/p/lazarus-ccr/svn/components/nicesidebar nicesidebar
52+```
5153
5254This applies also for Delphi users.
5355
5456In **Lazarus**, open the *nicesidebarlaz.lpk* file in the package editor ("Package" \> "Open Package File (.lpk)"), click "Use" \> "Install", and let the IDE recompile itself.
5557
5658In **Delphi**, open *NiceSideBarD7.dpk* in the IDE and press the *Install* button. Another package is provided in the download for newer Delphi versions, named *NiceSideBarXE11*; although tested under Delphi XE11 (Alexandria) it should work in other Delphi versions as well.
5759
5860The component will appear on the **priyatna.org** component palette tab.
5961
6062## Documentation
6163
6264### Methods
6365
6466Here are some main methods of the component:
6567
6668- `procedure`` BeginUpdate;`
6769
6870
6971Call this method to temporarily prevent the control from updating its content. This is useful when you want to add bulky items to the control.
7072
7173- `procedure`` EndUpdate;`
7274
7375
7476This method is used to re-enable update after calling BeginUpdate. You must call BeginUpdate prior to call this method.
7577
7678### Properties
7779
7880These are some main properties of the component:
7981
8082- `property`` Items: TSideBarItems;`
8183
8284
8385A collection of items. Each item usually has sub-items. You can associate item with a menu group. Each item can have a glyph supplied from an image list, while sub-items use bullets.
8486
8587- `property`` ItemIndex``: Integer;`
8688
8789
8890Specifies which item currently is selected.
8991
9092- `property`` SubItemIndex: Integer;`
9193
9294
9395Specifies which sub-item currently is selected.
9496
9597- `property`` ItemStyle: TSideBarItemStyle;`
9698
9799
98100This is where you can customize an item: normal state font and color, selected state font and color, hover state font and color, and also line color.
99101
100102- `property`` SubItemStyle: TSideBarItemStyle;`
101103
102104
103105This is where you can customize sub-items: normal state font and color, selected state font and color, hover state font and color, and also line color.
104106
105107- `property`` Bullets: TSideBarBulletStyle;`
106108
107109
108110This is where you can customize bullets: visibility, normal hover and selected state colors, outline colors and size. Currently it has three bullet style: round, rectangle and diamond.
109111
110112- `property`` Scrollers: TSideBarScrollerStyle;`
111113
112114
113115This is where you can customize the scroller arrow: normal, hover and selected colors and outline colors.
114116
115117- `property`` ItemHeight: Integer;`
116118
117119
118120Specifies the item height in pixels.
119121
120122- `property`` SubItemHeight: Integer;`
121123
122124
123125Specifies the height of sub-items in pixels.
124126
125127- `property`` Alignment: TSideBarAlign;`
126128
127129
128130Specifies alignment of the item caption: left, right or centered.
129131
130132- `property`` Margin: Integer;`
131133
132134
133135Specifies the margin, in pixels.
134136
135137- `property`` GroupSeparator: Integer;`
136138
137139
138140Specifies the vertical margin between groups (items), in pixels.
139141
140142- `property`` Indent: Integer;`
141143
142144
143145Specifies the amount of indentation of sub-items, in pixels.
144146
145147- `property`` AlwaysExpand: Boolean;`
146148
147149
148150Set to `true` if you want the control to always expands its sub-items.
149151
150152- `property`` Images: TImageList;`
151153
152154
153155Specifies the image list to use for items.
154156
155157- `property`` HoverImages: TImageList;`
156158
157159
158160Specifies an image list to use for items when in hover mode.
159161
160162- `property`` SelectedImages: TImageList;`
161163
162164
163165Specifies an image list to use for items when in selected mode.
164166
165167- `property`` HandPointCursor: Boolean;`
166168
167169
168170Set to `true` to use a handpoint cursor instead the default one.
169171
170172- `property`` OnHover: TSideBarEvent;`
171173
172174
173175An event that is fired everytime the mouse hovers over an item or sub-item.
174176
175177- `property`` OnSelect: TSideBarEvent;`
176178
177179
178180An event that is fired everytime the user selects an item or sub-item.
179181
180182- `property`` OnCustomDrawItem: TSideBarCustomDrawItem;`
181183
182184
183185You can customize item drawing by handling this event.
184186
185187- `property`` OnCustomDrawSubItem: TSideBarCustomDrawSubItem;`
186188
187189
188190You can customize sub-item drawing by handling this event.
189191
190192- `property`` OnCustomDrawNonItem: TSideBarCustomDrawNonItem;`
191193
192194
193195You can customize background drawing by handling this event.
194196
195197- `property`` OnCustomDrawScroller: TSideBarCustomDrawScroller;`
196198
197199
198200You can customize scroller drawing by handling this event.
199201
200202## Contact
201203
202204Don't hesitate to report any bug or whish to me:
203205
204206Priyatna Bandung - Indonesia
205207
206208<http://www.priyatna.org/>
207209
208210[mailto:me@priyatna.org](mailto:me@priyatna.org)
209211
210212> **Note:** The http address is no longer available. You may report bugs also in the Lazarus bug tracker for the CCR project,
211213
212214---
213215*From the Free Pascal wiki, page "NiceSideBar", as it stood on 2023-06-26 after a change by Wp, 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).*

Back to history