添加四个控件
- TToolbar
- Alignment: alTop
- TSpeedButton
- Alignment: alRight
- StyleLookUp: detailstoolbutton
- Margin, Right: 5 (this is set in case you want to carry this UI over to iOS as well, to account for both bordered (iOS6) and non-bordered (iOS7) button sizes
- TListBox with several items
- Each of the four listboxitems has a bitmap and text defined via the ItemData property
- Visibility has been set to False
- Height has been set to 176px (to show the listbox border right below the last listbox item)
- Anchors: akTop, akRight
- TShadowEffect
- Parented to TListBox
ListBox项属性:
TSpeedButton属性:
procedure TForm10.OverflowButtonClick(Sender: TObject);
begin
OverflowMenu.Visible := not OverflowMenu.Visible;
if OverflowMenu.Visible then
begin
OverflowMenu.ApplyStyleLookup;
OverflowMenu.RealignContent;
end;
end;
原文 http://blogs.embarcadero.com/sarinadupont/2013/10/17/463/