Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2004.06.20;
Скачать: [xml.tar.bz2];

Вниз

Как мне сделать описание 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;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.028 c
3-1085648929
CrazyMan
2004-05-27 13:08
2004.06.20
Как справиться с "" в селекте InterBase


14-1086093727
__
2004-06-01 16:42
2004.06.20
Как функционируют нормальные группы разработчиков?


1-1086324347
sk[a]ner
2004-06-04 08:45
2004.06.20
Безье


3-1085567789
Draught
2004-05-26 14:36
2004.06.20
Как изменить SQL запрос, что бы и пустые записи тоже были?


1-1086703741
BlackLord2003
2004-06-08 18:09
2004.06.20
ClipText





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский