Delphi FMX TabOrder和帧错误

时间:2018-03-09 09:25:05

标签: delphi firemonkey

使用Delphi 10.2.2我在使用框架时遇到了TabOrder的问题。

请看下面的图片,我设置tabOrder并期望焦点移动如下:使用TabOrder0编辑 - >在框架内编辑 - >使用TabOrder 2进行编辑 - >在一个框架内,在布局内编辑 - >使用TabOrder0编辑

Sample application picture

相反,使用制表符移动焦点会产生以下问题:

  1. 使用TabOrder0进行编辑 - >在框架内编辑 - >使用TabOrder0进行编辑 焦点永远不会通过TabOrder 2进行编辑

  2. 如果我强制对焦(使用鼠标)使用TabOrder 2进行编辑: 使用TabOrder编辑2>在一个框架内,在布局内编辑 - >在布局内部编辑框架内部。 焦点永远不会离开最后一次修改。

  3. 有没有人知道使TabOrder按预期运行的解决方法?

    关注.fmx的片段

    表格:

    object Form1: TForm1
      Left = 0
      Top = 0
      Caption = 'Form1'
      ClientHeight = 337
      ClientWidth = 414
      FormFactor.Width = 320
      FormFactor.Height = 480
      FormFactor.Devices = [Desktop]
      DesignerMasterStyle = 0
      object Edit4: TEdit
        Touch.InteractiveGestures = [LongTap, DoubleTap]
        TabOrder = 0
        Text = 'TabOrder 0'
        Position.X = 48.000000000000000000
        Position.Y = 16.000000000000000000
      end
      inline Frame21: TFrame2
        Position.X = 40.000000000000000000
        Position.Y = 80.000000000000000000
        Size.Width = 320.000000000000000000
        Size.Height = 62.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 1
      end
      object Edit5: TEdit
        Touch.InteractiveGestures = [LongTap, DoubleTap]
        TabOrder = 3
        Text = 'TabOrder 2'
        Position.X = 48.000000000000000000
        Position.Y = 160.000000000000000000
      end
      object Layout3: TLayout
        Position.X = 40.000000000000000000
        Position.Y = 200.000000000000000000
        Size.Width = 345.000000000000000000
        Size.Height = 121.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 4
        inline Frame22: TFrame2
          Position.X = 8.000000000000000000
          Position.Y = 51.000000000000000000
          Size.Width = 320.000000000000000000
          Size.Height = 62.000000000000000000
          Size.PlatformDefault = False
          TabOrder = 0
        end
        object Label1: TLabel
          Position.X = 24.000000000000000000
          Position.Y = 24.000000000000000000
          Size.Width = 305.000000000000000000
          Size.Height = 17.000000000000000000
          Size.PlatformDefault = False
          Text = 'TabOrder 3: TEdit inside frame, inside TLayout'
          TabOrder = 2
        end
      end
      object Label2: TLabel
        Position.X = 40.000000000000000000
        Position.Y = 56.000000000000000000
        Size.Width = 305.000000000000000000
        Size.Height = 17.000000000000000000
        Size.PlatformDefault = False
        Text = 'TabOrder 1: TEdit inside frame'
        TabOrder = 2
      end
    end  
    

    框架:

    object Frame2: TFrame2
      Size.Width = 320.000000000000000000
      Size.Height = 62.000000000000000000
      Size.PlatformDefault = False
      object Edit1: TEdit
        Touch.InteractiveGestures = [LongTap, DoubleTap]
        TabOrder = 0
        Position.X = 200.000000000000000000
        Position.Y = 24.000000000000000000
      end
    end 
    

0 个答案:

没有答案