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

Вниз

Как мне сделать описание OnClick   Найти похожие ветки 

 
Energy   (2004-06-04 16:08) [0]

вот этот незатейливый код! cоздаёт при нажатии на кнопку кучу Timage
------------
var
 Form1: TForm1;
 Imagecounter:integer;
const
 NamePrefix = "Img";

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
Imagecounter:=Imagecounter+1;
TImage.Create(Self).Name := NamePrefix + IntToStr(Imagecounter);
with Timage(FindComponent(NamePrefix + IntToStr(Imagecounter))) do
begin
Left:=10;
Top:=10;
height:=10;
width:=20;
Parent:=self;
picture.Bitmap:=image1.picture.Bitmap;
transparent:=true;
hint:="Картинка"+inttostr(Imagecounter);
showhint:=true;
autosize:=true;
autosize:=false;
proportional:=true;
resizeable:=false;
text:="";
end;
end;

А теперь ВОПРОС!
---------------------

Как мне сделать описание OnClick

Что-нибудь типа onclick(Button1Click(sender)); (сразу оговорюсь - это не правильная запись)


 
panov ©   (2004-06-04 16:14) [1]

Поиск для того и сделан, чтобы искать.

http://delphimaster.net/view/1-1086278913/


 
Семен Сорокин ©   (2004-06-04 16:17) [2]

OnClick := Button1Click


 
Fay ©   (2004-06-04 16:18) [3]

Occurs when the user clicks the control.

Delphi syntax:

property OnClick: TNotifyEvent;

C++ syntax:

__property Classes::TNotifyEvent OnClick = {read=FOnClick, write=FOnClick, stored=IsOnClickStored};

Description

Use the OnClick event handler to respond when the user clicks the control. If the control has an associated action, and that action has an OnExecute method, the action’s OnExecute method responds to click events unless it is superseded by an OnClick event handler.

Usually OnClick occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when

The user selects an item in a grid, outline, list, or combo box by pressing an arrow key.
The user presses Spacebar while a button or check box has focus.
The user presses Enter when the active form has a default button (specified by the Default property).
The user presses Esc when the active form has a cancel button (specified by the Cancel property).
The user presses the accelerator key for a button or check box. For example, if the value of the Caption property of a check box is "&Bold", the B is underlined at runtime and the OnClick event of the check box is triggered when the user presses Alt+B.

The Checked property of a radio button is set to true.
The value of the Checked property of a check box is changed.
The Click method of a menu item is called.

For a form, an OnClick event occurs when the user clicks a blank area of the form or on a disabled component.


 
Energy   (2004-06-04 16:26) [4]

:) Спасибо



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

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

Наверх




Память: 0.47 MB
Время: 0.053 c
14-1085566482
Ajax
2004-05-26 14:14
2004.06.20
Регистрация в РосНИИРОС


9-1076674664
jab~
2004-02-13 15:17
2004.06.20
DelphiX - Рождение и смерть спрайтов.


6-1082982090
WinLamka
2004-04-26 16:21
2004.06.20
мониторинг шаров.


6-1082979557
V@LER@N
2004-04-26 15:39
2004.06.20
Помогите с сокетом


1-1086324889
Алекс
2004-06-04 08:54
2004.06.20
народ программа вылетает - непонятно какая ошибка,помогите разобр