firemonkey开发app(手势gesture)

1、新建multidevic-application工程项目。

2、toolbar+speedbuttonX2+layout-》tabcontrol+gesturemanager+actionlist等组件。

  SpeedButton1.Name := 'SpeedButton1';
  SpeedButton1.Parent := ToolBar1;
  SpeedButton1.Action := PreviousTabAction1;
  SpeedButton1.Align := Left;
  SpeedButton1.StyleLookup := 'arrowlefttoolbutton';
  SpeedButton2.Name := 'SpeedButton2';
  SpeedButton2.Parent := ToolBar1;
  SpeedButton2.Action := NextTabAction1;
  SpeedButton2.Align := Right;
  SpeedButton2.StyleLookup := 'arrowrighttoolbutton';

imagelist组件设置。

tabcontrol属性设置。

tabitem1-4属性设置。0-3

actionlist属性设置。

tabcontrol手势控制代码。

procedure TForm1.TabControl1Gesture(Sender: TObject; const EventInfo: TGestureEventInfo; var Handled: Boolean);
begin
  case EventInfo.GestureID of
    sgiLeft:
      begin
        TabControl1.Previous();
        Handled := True;
      end;
    sgiRight:
      begin
        TabControl1.Next();
        Handled := True;
      end;
  end;

end;

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值