我想是实现像foxmail软件的窗口,分四块区域,可以拖动改变大小,这种窗口布局,是怎样实现的,请提供个例子,谢谢!

解决方案 »

  1.   

    大多数区域拖动可以使用TSplitter与TPanel
    object Form1: TForm1
      Left = 192
      Top = 103
      Width = 696
      Height = 480
      Caption = 'Form1'
      Color = clBtnFace
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      OldCreateOrder = False
      PixelsPerInch = 96
      TextHeight = 13
      object Splitter1: TSplitter
        Left = 185
        Top = 92
        Height = 361
      end
      object Splitter2: TSplitter
        Left = 0
        Top = 89
        Width = 688
        Height = 3
        Cursor = crVSplit
        Align = alTop
      end
      object Memo1: TMemo
        Left = 0
        Top = 92
        Width = 185
        Height = 361
        Align = alLeft
        Lines.Strings = (
          'Memo1')
        TabOrder = 0
      end
      object Memo2: TMemo
        Left = 0
        Top = 0
        Width = 688
        Height = 89
        Align = alTop
        Lines.Strings = (
          'Memo2')
        TabOrder = 1
      end
      object Memo3: TMemo
        Left = 188
        Top = 92
        Width = 500
        Height = 361
        Align = alClient
        Lines.Strings = (
          'Memo3')
        TabOrder = 2
      end
    end