|
( G) \! R4 W) \8 m) y0 ?
生成控件,然后设定控件对应的单击函数和双击函数
& _" T, l V% {% l) y+ A; R' qvoid __fastcall myImageClick(TObject *Sender) . n1 g' @0 J/ Z& N
{
1 k) `, h/ h* S* N- r4 _ do what you want to do
/ U& H% f; ^$ H% ^ y) _6 e}
; Y/ W: @. r7 y" KTImage myImage=new TImage();
0 y! X. o4 r! o4 x: \4 V- ^% VmyImage->parent=this;
/ N( U% `! d) o7 E) dmyImage->left=??
7 d, E; f, u( tmyImage->top=?? 0 t' \6 ^* t" F$ p# v3 y
myImage->width=; : J# O: S1 T5 ~: D% z
myImage->Height=; , D7 J! [) @* A, n/ W
myImage->visible=true; ; @# `$ L5 t! k! \; K' x; \
myImage->OnClick=myImageClick;//动态绑定事件 9 s: c1 V" `7 p
双击也类似 |