Dock of the delphi Control

Source: Internet
Author: User

It takes only two steps to turn a form or control into a dock:

(1) set the DragKind feature to dkDock.

(2) set the DragMode feature to dmAutomatic.

In addition, the TPanel control has a UseDockManager feature. If it is set to true, it expands the size of the preceding control to the size of the Panel, which is filled with all the Panel space.

 

DEMO code:

Create a VCL form project and add the interface code:

Object Form1: TForm1
Left = 0
Top = 0
Caption = #25511 #20214 #20572 #38752 ''#29482 #24735 #33021
ClientHeight = 1, 293
ClientWidth = 347
Color = clBtnFace
DockSite = True
Font. Charset = DEFAULT_CHARSET
Font. Color = clWindowText
Font. Height =-11
Font. Name = 'tahoma'
Font. Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
Object shape1: tshape
Left = 1, 208
Top = 48
Width = 105
Height = 97
Dragkind = dkdock
Dragmode = dmautomatic
End
Object shape2: tshape
Left = 1, 208
Maximum = 160
Width = 121
Height = 41
Dragkind = dkdock
Dragmode = dmautomatic
End
Object Panel1: tpanel
Left = 25
Top = 24
Width = 161
Height = 225
Caption = 'panel1'
DockSite = True
TabOrder = 0
End
End

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.