TTMSFNCToolBar.State Property
Display state of this toolbar element — normal or large.
API unit family: TMSFNCToolBar
Declaring type: TTMSFNCToolBar
Inherited from: TTMSFNCCustomToolBar
Type: TTMSFNCToolBarElementState
Syntax
property State: TTMSFNCToolBarElementState;
__property TTMSFNCToolBarElementState State = {read=FState, write=SetState, default=0};
Default: esNormal
Usage examples
Switch the toolbar to the large (touch) state
Configures per-button layout and bitmap position, then switches the toolbar to the large state.
procedure TForm1.ConfigureLargeState;
var
Button: TTMSFNCToolBarButton;
begin
TMSFNCToolBar1.BitmapContainer := BitmapContainer1;
// The 3rd/4th AddButton arguments name the normal and large-state bitmaps.
Button := TMSFNCToolBar1.AddButton(-1, -1, 'save', 'save-large', 'Save');
Button.BitmapPosition := bbpTop; // icon above the caption
Button.Layout := bblLarge; // large icon + label layout
Button.MinimumLayout := bblBitmap; // collapse to icon-only when space is tight
Button.MaximumLayout := bblLarge;
// Switch the whole toolbar to the large (touch) state. Buttons render their
// large-state bitmaps and grow to touch-friendly sizes.
TMSFNCToolBar1.State := esLarge;
TMSFNCToolBar1.Build;
end;
void __fastcall TForm1::ConfigureLargeState()
{
// BitmapContainer is protected at runtime: assign BitmapContainer1 to the
// toolbar's BitmapContainer in the Object Inspector.
// The 3rd/4th AddButton arguments name the normal and large-state bitmaps.
TTMSFNCToolBarButton *Button = TMSFNCToolBar1->AddButton(-1, -1, "save", "save-large", "Save");
Button->BitmapPosition = bbpTop; // icon above the caption
Button->Layout = bblLarge; // large icon + label layout
Button->MinimumLayout = bblBitmap; // collapse to icon-only when space is tight
Button->MaximumLayout = bblLarge;
// Switch the whole toolbar to the large (touch) state. Buttons render their
// large-state bitmaps and grow to touch-friendly sizes.
TMSFNCToolBar1->State = esLarge;
TMSFNCToolBar1->Build();
}