NiceSideBar: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: NiceSideBar
| Old | New | Line | |
|---|---|---|---|
| 1 | + | <figure> | |
| 2 | + | <img src="nicesidebar.png" title="nicesidebar.png" /> | |
| 3 | + | <figcaption>nicesidebar.png</figcaption> | |
| 4 | + | </figure> | |
| 5 | + | ||
| 6 | + | The 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. | |
| 7 | + | ||
| 8 | + | ## Introduction | |
| 9 | + | ||
| 10 | + | **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. | |
| 11 | + | ||
| 12 | + | ## Version History | |
| 13 | + | ||
| 14 | + | ### Version 2.0 | |
| 15 | + | ||
| 16 | + | Released: June 2023 | |
| 17 | + | ||
| 18 | + | - Lazarus support | |
| 19 | + | - Cross-platform: Win32/64, Linux (gtk2, gtk3, qt, qt5, qt6), macOS (cocoa) | |
| 20 | + | - High-dpi support in the Lazarus version | |
| 21 | + | ||
| 22 | + | ### Version 1.2 | |
| 23 | + | ||
| 24 | + | Released: January 12, 2008 | |
| 25 | + | ||
| 26 | + | - Added properties to items and subitems: Enabled, Visible, ItemEnabled, ItemVisible | |
| 27 | + | - Added properties: disabled colors, disabled images | |
| 28 | + | - Keyboard control: PgUp, PgDown, Up and Down arrows | |
| 29 | + | - Reported bugs fixed | |
| 30 | + | ||
| 31 | + | ### Version 1.1 | |
| 32 | + | ||
| 33 | + | Released: June 28, 2007 | |
| 34 | + | ||
| 35 | + | - Reported bugs fixed | |
| 36 | + | ||
| 37 | + | ### Version 1.0 | |
| 38 | + | ||
| 39 | + | Released: May 26th, 2007 | |
| 40 | + | ||
| 41 | + | - Initial Release | |
| 42 | + | ||
| 43 | + | ## License | |
| 44 | + | ||
| 45 | + | This 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. | |
| 46 | + | ||
| 47 | + | ## Download and installation | |
| 48 | + | ||
| 49 | + | The 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. | |
| 50 | + | ||
| 51 | + | Since 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: | |
| 52 | + | ||
| 53 | + | `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` | |
| 54 | + | ||
| 55 | + | This applies also for Delphi users. | |
| 56 | + | ||
| 57 | + | In **Lazarus**, open the *nicesidebarlaz.lpk* file in the package editor ("Package" \> "Open Package File (.lpk)"), click "Use" \> "Install", and let the IDE recompile itself. | |
| 58 | + | ||
| 59 | + | In **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. | |
| 60 | + | ||
| 61 | + | The component will appear on the **priyatna.org** component palette tab. | |
| 62 | + | ||
| 63 | + | ## Documentation | |
| 64 | + | ||
| 65 | + | ### Methods | |
| 66 | + | ||
| 67 | + | Here are some main methods of the component: | |
| 68 | + | ||
| 69 | + | - <b>`procedure`</b>` BeginUpdate;` | |
| 70 | + | ||
| 71 | + | ||
| 72 | + | Call this method to temporarily prevent the control from updating its content. This is useful when you want to add bulky items to the control. | |
| 73 | + | ||
| 74 | + | - <b>`procedure`</b>` EndUpdate;` | |
| 75 | + | ||
| 76 | + | ||
| 77 | + | This method is used to re-enable update after calling BeginUpdate. You must call BeginUpdate prior to call this method. | |
| 78 | + | ||
| 79 | + | ### Properties | |
| 80 | + | ||
| 81 | + | These are some main properties of the component: | |
| 82 | + | ||
| 83 | + | - <b>`property`</b>` Items: TSideBarItems;` | |
| 84 | + | ||
| 85 | + | ||
| 86 | + | A 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. | |
| 87 | + | ||
| 88 | + | - <b>`property`</b>` ItemIndex`</b>`: Integer;` | |
| 89 | + | ||
| 90 | + | ||
| 91 | + | Specifies which item currently is selected. | |
| 92 | + | ||
| 93 | + | - <b>`property`</b>` SubItemIndex: Integer;` | |
| 94 | + | ||
| 95 | + | ||
| 96 | + | Specifies which sub-item currently is selected. | |
| 97 | + | ||
| 98 | + | - <b>`property`</b>` ItemStyle: TSideBarItemStyle;` | |
| 99 | + | ||
| 100 | + | ||
| 101 | + | This 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. | |
| 102 | + | ||
| 103 | + | - <b>`property`</b>` SubItemStyle: TSideBarItemStyle;` | |
| 104 | + | ||
| 105 | + | ||
| 106 | + | This 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. | |
| 107 | + | ||
| 108 | + | - <b>`property`</b>` Bullets: TSideBarBulletStyle;` | |
| 109 | + | ||
| 110 | + | ||
| 111 | + | This 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. | |
| 112 | + | ||
| 113 | + | - <b>`property`</b>` Scrollers: TSideBarScrollerStyle;` | |
| 114 | + | ||
| 115 | + | ||
| 116 | + | This is where you can customize the scroller arrow: normal, hover and selected colors and outline colors. | |
| 117 | + | ||
| 118 | + | - <b>`property`</b>` ItemHeight: Integer;` | |
| 119 | + | ||
| 120 | + | ||
| 121 | + | Specifies the item height in pixels. | |
| 122 | + | ||
| 123 | + | - <b>`property`</b>` SubItemHeight: Integer;` | |
| 124 | + | ||
| 125 | + | ||
| 126 | + | Specifies the height of sub-items in pixels. | |
| 127 | + | ||
| 128 | + | - <b>`property`</b>` Alignment: TSideBarAlign;` | |
| 129 | + | ||
| 130 | + | ||
| 131 | + | Specifies alignment of the item caption: left, right or centered. | |
| 132 | + | ||
| 133 | + | - <b>`property`</b>` Margin: Integer;` | |
| 134 | + | ||
| 135 | + | ||
| 136 | + | Specifies the margin, in pixels. | |
| 137 | + | ||
| 138 | + | - <b>`property`</b>` GroupSeparator: Integer;` | |
| 139 | + | ||
| 140 | + | ||
| 141 | + | Specifies the vertical margin between groups (items), in pixels. | |
| 142 | + | ||
| 143 | + | - <b>`property`</b>` Indent: Integer;` | |
| 144 | + | ||
| 145 | + | ||
| 146 | + | Specifies the amount of indentation of sub-items, in pixels. | |
| 147 | + | ||
| 148 | + | - <b>`property`</b>` AlwaysExpand: Boolean;` | |
| 149 | + | ||
| 150 | + | ||
| 151 | + | Set to `true` if you want the control to always expands its sub-items. | |
| 152 | + | ||
| 153 | + | - <b>`property`</b>` Images: TImageList;` | |
| 154 | + | ||
| 155 | + | ||
| 156 | + | Specifies the image list to use for items. | |
| 157 | + | ||
| 158 | + | - <b>`property`</b>` HoverImages: TImageList;` | |
| 159 | + | ||
| 160 | + | ||
| 161 | + | Specifies an image list to use for items when in hover mode. | |
| 162 | + | ||
| 163 | + | - <b>`property`</b>` SelectedImages: TImageList;` | |
| 164 | + | ||
| 165 | + | ||
| 166 | + | Specifies an image list to use for items when in selected mode. | |
| 167 | + | ||
| 168 | + | - <b>`property`</b>` HandPointCursor: Boolean;` | |
| 169 | + | ||
| 170 | + | ||
| 171 | + | Set to `true` to use a handpoint cursor instead the default one. | |
| 172 | + | ||
| 173 | + | - <b>`property`</b>` OnHover: TSideBarEvent;` | |
| 174 | + | ||
| 175 | + | ||
| 176 | + | An event that is fired everytime the mouse hovers over an item or sub-item. | |
| 177 | + | ||
| 178 | + | - <b>`property`</b>` OnSelect: TSideBarEvent;` | |
| 179 | + | ||
| 180 | + | ||
| 181 | + | An event that is fired everytime the user selects an item or sub-item. | |
| 182 | + | ||
| 183 | + | - <b>`property`</b>` OnCustomDrawItem: TSideBarCustomDrawItem;` | |
| 184 | + | ||
| 185 | + | ||
| 186 | + | You can customize item drawing by handling this event. | |
| 187 | + | ||
| 188 | + | - <b>`property`</b>` OnCustomDrawSubItem: TSideBarCustomDrawSubItem;` | |
| 189 | + | ||
| 190 | + | ||
| 191 | + | You can customize sub-item drawing by handling this event. | |
| 192 | + | ||
| 193 | + | - <b>`property`</b>` OnCustomDrawNonItem: TSideBarCustomDrawNonItem;` | |
| 194 | + | ||
| 195 | + | ||
| 196 | + | You can customize background drawing by handling this event. | |
| 197 | + | ||
| 198 | + | - <b>`property`</b>` OnCustomDrawScroller: TSideBarCustomDrawScroller;` | |
| 199 | + | ||
| 200 | + | ||
| 201 | + | You can customize scroller drawing by handling this event. | |
| 202 | + | ||
| 203 | + | ## Contact | |
| 204 | + | ||
| 205 | + | Don't hesitate to report any bug or whish to me: | |
| 206 | + | ||
| 207 | + | Priyatna Bandung - Indonesia | |
| 208 | + | ||
| 209 | + | <http://www.priyatna.org/> | |
| 210 | + | ||
| 211 | + | [mailto:me@priyatna.org](mailto:me@priyatna.org) | |
| 212 | + | ||
| 213 | + | > **Note:** The http address is no longer available. You may report bugs also in the Lazarus bug tracker for the CCR project, | |
| 214 | + | ||
| 215 | + | --- | |
| 216 | + | *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).* |
