Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.06.24;
Скачать: CL | DM;

Вниз

Проблема с положением объектов в ScrollBoxe   Найти похожие ветки 

 
webpauk   (2007-04-23 18:31) [0]

unit Unit1;

interface

uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs, StdCtrls;

type
 TForm1 = class(TForm)
   ScrollBox1: TScrollBox;
   Button1: TButton;
   Button2: TButton;
   procedure Button1Click(Sender: TObject);
   procedure Button2Click(Sender: TObject);
 end;

var
 Form1: TForm1;
 B1, B2: TButton;
 
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
 B1:=TButton.Create(ScrollBox1);
 B1.Left:=50;
 B1.Top:=800;
 b1.Parent:=ScrollBox1;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
 B2:=TButton.Create(ScrollBox1);
 B2.Left:=50;
 B2.Top:=0;
 b2.Parent:=ScrollBox1;
end;

end.


ежели сначала сделать Button1Click и проскролить ScrollBox к низу, то когда делаешь Button2Click, то положение B2.top<>0, а равно 0+смещение ScrollBoxa
как поместить B2 реально в Top:=0?


 
webpauk   (2007-04-23 18:32) [1]

ScrollBox1.width:=400;


 
webpauk   (2007-04-23 18:35) [2]


> webpauk   (23.04.07 18:32) [1]
> ScrollBox1.width:=400;

извиняюсь, имел в виду: height


 
webpauk   (2007-04-23 19:11) [3]

ScrollBox1.VertScrollBar.Position:=0;
...решение проблемы!



Страницы: 1 вся ветка

Текущий архив: 2007.06.24;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.018 c
15-1180348711
s_t_d
2007-05-28 14:38
2007.06.24
Кириллица в TURBO PASCAL 7.1


2-1180945084
Soi_
2007-06-04 12:18
2007.06.24
Как ускорить скорость выполнения циклов?


15-1180041541
snowkam2
2007-05-25 01:19
2007.06.24
угол падения равен углу отражения


2-1180949897
TStas
2007-06-04 13:38
2007.06.24
Почему у TObject а constructor static, а destructor - dynamic?


15-1180150517
koha
2007-05-26 07:35
2007.06.24
Помогите пожалуйста с переводом