您好,请教一个控件问题,谢谢(20分)

  • 主题发起人 主题发起人 pcgod
  • 开始时间 开始时间
P

pcgod

Unregistered / Unconfirmed
GUEST, unregistred user!
您好,怎样让 Form1 上的 Memo1,Panel1,ToolBar,工具按钮,菜单 随 Form1 按比例缩放 ?

谢谢
 
菜单是不可能的

你可以去找一个自动缩放的Panel来,很多这样的VCL组件
 
1. 就基本 VCL (Delphi 自带的) 可不可以 ? 怎么做 ?

2. 哪儿有您说的控件下载 ?

------------------------------------------------------------
object Form1: TForm1
Left = 117
Top = 118
Width = 586
Height = 445
AutoSize = True
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Menu = MainMenu1
OldCreateOrder = False
Scaled = False
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Memo1: TMemo
Left = 0
Top = 24
Width = 577
Height = 348
Lines.Strings = (
'Memo1')
TabOrder = 0
end
object Button1: TButton
Left = 304
Top = 176
Width = 75
Height = 25
Caption = 'Button1'
TabOrder = 1
OnClick = Button1Click
end
object Edit1: TEdit
Left = 120
Top = 112
Width = 121
Height = 21
TabOrder = 2
Text = 'Edit1'
end
object Edit2: TEdit
Left = 248
Top = 112
Width = 121
Height = 21
TabOrder = 3
Text = 'Edit2'
end
object Edit3: TEdit
Left = 376
Top = 112
Width = 121
Height = 21
TabOrder = 4
Text = 'Edit3'
end
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 578
Height = 23
AutoSize = True
ButtonHeight = 21
ButtonWidth = 67
Caption = 'ToolBar1'
Flat = True
ShowCaptions = True
TabOrder = 5
object Btn2: TToolButton
Left = 0
Top = 0
Caption = '单位注册'
ImageIndex = 0
OnClick = Btn2Click
end
object Btn3: TToolButton
Left = 67
Top = 0
Caption = '个人注册'
Enabled = True
ImageIndex = 4
OnClick = Btn3Click
end
object ToolButton5: TToolButton
Left = 134
Top = 0
Width = 8
Caption = 'ToolButton5'
ImageIndex = 4
Style = tbsSeparator
end
object Btn4: TToolButton
Left = 142
Top = 0
Caption = '数据管理'
Enabled = False
ImageIndex = 2
end
object Btn5: TToolButton
Left = 209
Top = 0
Caption = '数据约束'
Enabled = False
ImageIndex = 3
end
object Btn6: TToolButton
Left = 276
Top = 0
Caption = '数据整理'
Enabled = False
ImageIndex = 5
end
object ToolButton6: TToolButton
Left = 343
Top = 0
Width = 8
Caption = 'ToolButton6'
ImageIndex = 4
Style = tbsSeparator
end
object Btn7: TToolButton
Left = 351
Top = 0
Caption = '退出'
ImageIndex = 1
OnClick = Btn7Click
end
end
object Panel1: TPanel
Left = 0
Top = 371
Width = 118
Height = 28
BevelOuter = bvNone
Caption = 'Panel1'
TabOrder = 6
end
object Panel2: TPanel
Left = 118
Top = 371
Width = 142
Height = 28
BevelOuter = bvNone
Caption = 'Panel2'
TabOrder = 7
end
object Panel3: TPanel
Left = 260
Top = 371
Width = 144
Height = 28
BevelOuter = bvNone
Caption = 'Panel3'
TabOrder = 8
end
object Panel4: TPanel
Left = 404
Top = 371
Width = 173
Height = 28
BevelOuter = bvNone
Caption = 'Panel4'
TabOrder = 9
end
object MainMenu1: TMainMenu
Left = 120
Top = 72
object N1: TMenuItem
Caption = '系统设置'
object N5: TMenuItem
Caption = '连接'
OnClick = N5Click
end
object N6: TMenuItem
Caption = '断开'
OnClick = N6Click
end
end
object N2: TMenuItem
Caption = '数据载入'
Enabled = False
object N7: TMenuItem
Caption = '录入'
end
object N8: TMenuItem
Caption = '删除'
end
object N9: TMenuItem
Caption = '修改'
end
end
object N3: TMenuItem
Caption = '查询'
Enabled = False
object N10: TMenuItem
Caption = '数量计划'
end
object N11: TMenuItem
Caption = '小结'
end
end
object N4: TMenuItem
Caption = '退出'
OnClick = N4Click
end
end
object Timer1: TTimer
Interval = 100
OnTimer = Timer1Timer
Left = 152
Top = 72
end
object Timer2: TTimer
OnTimer = Timer2Timer
Left = 184
Top = 72
end
end
----------------------------------------------------
就这个,能不能自动缩放 ?

谢谢
 
怎么没有回贴 ?

Help :)
 
Memo1.Align := alClient;
Panel1.Align := alClient;
ToolBar.Align := altop;
 
谢谢您

Memo : Memo1.Align := alClient;
加一个 Panel 居于底部,在上面再加 Panel,分别居左或居右,设置其 BevelOuter 为 None
即可
 
我想给自己也加点分,可以吗 ,怎么加 ?
 
多人接受答案了。
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
后退
顶部