Вниз
Скачать: 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 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.032 c
1-1086450716
parovoZZ
2004-06-05 19:51
2004.06.20
Окно как в проводнике


1-1086447044
a3a3ello
2004-06-05 18:50
2004.06.20
Application.Terminate


4-1084263440
Oyster
2004-05-11 12:17
2004.06.20
Скрытие приложения из списка задач


1-1086761992
artem_123
2004-06-09 10:19
2004.06.20
вопрос по mainmenu


14-1086258358
vecna
2004-06-03 14:25
2004.06.20
Ой... Каспера поймали =)




   Наверх