Skip to main content

TrackBar

Examples#

Basic#

export function App() {    return (        <Window>            <DemoLayout width="500dpx" height="25dpx">                <TrackBar                    onThumbRelease={(sender) => {                        console.log(                            `on thumb release, current value: ${sender.GetValue()}`,                        );                    }}                ></TrackBar>            </DemoLayout>        </Window>    );}

Drag it and get value:

track bar basic

In console:

on thumb release, current value: 0on thumb release, current value: 22on thumb release, current value: 46on thumb release, current value: 69on thumb release, current value: 75on thumb release, current value: 85on thumb release, current value: 100...

API#

export interface ITrackBarComponentProps extends IComponentProps {    onThumbRelease?: Parameters<ITrackBar['OnThumbRelease']>[0];}