Вниз
Скачать: 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.45 MB
Время: 0.02 c
3-1085567789
Draught
2004-05-26 14:36
2004.06.20
Как изменить SQL запрос, что бы и пустые записи тоже были?


4-1084621171
Mameluke
2004-05-15 15:39
2004.06.20
Help по WinAPI Delphi


1-1086683687
ol
2004-06-08 12:34
2004.06.20
помогите перевести си - шный код под делфи


14-1086160035
Baks
2004-06-02 11:07
2004.06.20
Досадная ошибка


1-1086350896
Energy
2004-06-04 16:08
2004.06.20
Как мне сделать описание OnClick




   Наверх