A navigation control whose items can be organized into collapsible or expandable groups.
Version: 2023r1
Properties #
AllowMultiExpansion as Boolean | HeaderDividerColor as Color (Default = &c181818) |
VerticalScroll as XDSAccordion.ScrollbarVisibility | HeaderClosedIcon as Picture |
HeaderBackgroundColor as Color (Default = &c3A3B3C) | HeaderExpandedIcon as Picture |
HeaderTextColor as Color (Default = &cFEFEFE) |
Methods #
AddAccordionPage(xPage as DesktopContainer, Caption as String, Optional Expanded as Boolean = False) | ExpandAll() |
Arrange() | UpdateAccordion() |
CollapseAll() |
Events #
DragEnter | FocusReceived |
DragExit | KeyDown |
DragOver | KeyUp |
DropObject | Opening |
FocusLost |
Enumerations #
XDSAccordion.ScrollbarVisibility #
AutoHide = 0 (Default) |
AlwaysVisible = 1 |
Hidden = 2 |
Adding Pages to an Accordion #
Create instances of DesktopContainer and add them to the accordion as follows, replacing ‘DesktopContainer’ with the name of the actual DesktopContainer instance.
In the example below, the code is placed in the Opening event of a new XDSAccordion instance.
Sub Opening() Handles Opening
me.AddAccordionPage(new DesktopContainer, "Header Title 1", true)
me.AddAccordionPage(new DesktopContainer, "Header Title 2")
me.AddAccordionPage(new DesktopContainer, "Header Title 3")
me.UpdateAccordion()
End Sub
Included Dependencies #
XDSAccordionHeader – This class is exclusively used by the XDSAccordion class and should not be accessed/used by a developer.
If no pictures/icons are added by the developer for HeaderClosedIcon or HeaderExpandedIcon, the default included right-pointing and downward-pointing arrows are used. The default included icons are Light/Dark-mode aware and will adjust accordingly upon instantiation.