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 or onactivate
  • to avoid vcl problems or app crashes
  • for common handlers sufficient use main window ... (i use this instead of null)
  • if have single handler multiple components deciding operation or target sender parameter in case need pass pointer component itself

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -