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;