大悟还俗

邮箱 key_ok@qq.com 我的收集 http://pan.baidu.com/share/home?uk=1177427271
posts - 236, comments - 8, trackbacks - 0, articles - 0
  新随笔  :: 联系 :: 订阅 订阅  :: 管理

在Android中创建一个下拉菜单

Posted on 2013-10-18 18:04 大悟还俗 阅读(...) 评论(...) 编辑 收藏

 

添加四个控件 

 

 

    • 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项属性:

TSpeed​​Button属性:

 

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/