invoke manually button click event in c++ builder -
using c++ builder borland (bcb6).
i wish invoke manually button click event. did:
fmap->bbdoneinclick(null);
while done
button located on fmap
form, went wrong that.
do need call bbdoneinclick
different parameters , not null
?
instead of null
use form1
or bbdone
...
- it depends on event code how uses
sender
parameter - also can call event handler safely if form created
- if not access canvas can use in
tform1::tform1
constructor - if need take care of not using prior
onshow
oronactivate
- to avoid vcl problems or app crashes
- for common handlers sufficient use main window ... (i use
this
instead ofnull
) - if have single handler multiple components deciding operation or target
sender
parameter in case need pass pointer component itself
Comments
Post a Comment