Показать сообщение отдельно

  #14  
Старый 08.01.2010, 14:35
nerezus
Флудер
Регистрация: 12.08.2004
Сообщений: 3,791
С нами: 11444066

Репутация: 2290


По умолчанию

Цитата:
procedure TForm1.FormCreate(Sender: TObject);
var b:byte; c:tCheckBox; e:tEdit; u:tButton; x,y,w,t:word;
begin
font:=screen.MenuFont;
canvas.Font:=font;
x:=8;y:=8;w:=0;
for b:=32 to 255 do begin
c:=tCheckBox.Create(self);c.Parent:=self;
c.Left:=x;c.Top:=y;c.Caption:=chr(b)+#32;
c.Hint:=c.Caption;c.ShowHint:=true;
c.Width:=canvas.TextWidth(c.Caption)+16;
c.Name:='c'+inttostr(b);c.Font:=canvas.Font;c.Show ;
c.Checked:=(b>=$C0)or(b=$A8)or(b=$B8);
if b=255 then break;
t:=c.Width+8;
if t>w then w:=t;
inc(y,c.Height+8);
if y>clientHeight-18 then
begin inc(x,w);y:=8;end;
end;
clientWidth:=x+w;
e:=tEdit.Create(self);e.Parent:=self;
e.Left:=8;e.Top:=clientHeight-9;
e.AutoSize:=false;e.Width:=(clientWidth div 3)*2;
e.Name:='ee';e.Text:='test1АБВгде123';e.Show ;
clientHeight:=e.Top+e.Height+9;
u:=tbutton.Create(self);u.Parent:=self;
u.Left:=e.Left*2+e.Width;u.Top:=e.Top;
u.Height:=e.Height;u.Width:=clientWidth-u.Left-9;
u.Caption:='Remove selected chars';
u.OnClick:=ButtonClick;
end;
Суперчитаемый код *ROFL*
 
Ответить с цитированием