Главная страница
    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.45 MB
Время: 0.037 c
3-1085658120
lehich
2004-05-27 15:42
2004.06.20
заголовки таблиц


3-1085475412
serg128
2004-05-25 12:56
2004.06.20
Есть ли какие-то агрегирующие функции в TClientDataSet?


14-1086069462
Леприкон
2004-06-01 09:57
2004.06.20
Настораживает qwe8264.dll


14-1086303218
mfender
2004-06-04 02:53
2004.06.20
winexec, или кто там...


14-1086119622
Иван Усачев
2004-06-01 23:53
2004.06.20
какой firewalls использовать?





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский