ListBox
#
Examples#
Basicexport function App() { return ( <Window> <DemoLayout width="200dpx" height="300dpx"> <ListBox items={['a', 'b', 'c']} onSelectionEnd={(sender) => { console.log(sender.GetSelection()); }} ></ListBox> </DemoLayout> </Window> );}
Display a list of items, and get index of selected item:
In console:
012
#
APIexport interface IListBoxComponentProps extends IComponentProps { items?: string[]; onSelectionEnd?: Parameters<IListBox['OnSelectionEnd']>[0];}