Resize panels (like Outlook express)

Hi there,

How can I resize two panels, like how you can resize the inbox in outlook (between messages list up top, and message below). Like, you put your mouse between them and make the message panel bigger or the message list.

Thanks :)
Nick
LVL 10
wildzeroAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

esoftbgCommented:
You should use a VCL Component TSplitter and two VCL Components TPanels

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    Splitter1: TSplitter;
    Panel2: TPanel;
    private
    { Private declarations }
    public
    { Public declarations }
  end;

using the Object Inspector, you should set the Component's properties this way:

Panel1.Align --> alTop
Splitter1.Align --> alTop
Panel2.Align --> alClient

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
wildzeroAuthor Commented:
Thanks alot :-)
Easy as pie
calinutzCommented:
Paste this in the Form's dfm:

object Form1: TForm1
  Left = 192
  Top = 107
  Width = 696
  Height = 480
  Caption = 'Outlook Express'
  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 Splitter2: TSplitter
    Left = 173
    Top = 0
    Height = 453
  end
  object Panel1: TPanel
    Left = 0
    Top = 0
    Width = 173
    Height = 453
    Align = alLeft
    Caption = 'Panel1'
    TabOrder = 0
    object Splitter1: TSplitter
      Left = 1
      Top = 189
      Width = 171
      Height = 3
      Cursor = crVSplit
      Align = alTop
    end
    object TreeView1: TTreeView
      Left = 1
      Top = 1
      Width = 171
      Height = 188
      Align = alTop
      Indent = 19
      TabOrder = 0
    end
    object ListBox1: TListBox
      Left = 1
      Top = 192
      Width = 171
      Height = 260
      Align = alClient
      ItemHeight = 13
      TabOrder = 1
    end
  end
  object Panel2: TPanel
    Left = 176
    Top = 0
    Width = 512
    Height = 453
    Align = alClient
    Caption = 'Panel2'
    TabOrder = 1
    object Splitter3: TSplitter
      Left = 1
      Top = 221
      Width = 510
      Height = 3
      Cursor = crVSplit
      Align = alTop
    end
    object ListBox2: TListBox
      Left = 1
      Top = 1
      Width = 510
      Height = 220
      Align = alTop
      ItemHeight = 13
      TabOrder = 0
    end
    object Memo1: TMemo
      Left = 1
      Top = 224
      Width = 510
      Height = 228
      Align = alClient
      Lines.Strings = (
        'Memo1')
      TabOrder = 1
    end
  end
end

// this is exactly like the way Outlook Express looks like
esoftbgCommented:
download a simple example from:
page:        http://www.geocities.com/esoftbg/
  link:        Q_21479269.zip        Resize panels (like Outlook express)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.