BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Event handler

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Mark
Guest





PostPosted: Thu Jun 24, 2004 4:45 pm    Post subject: Event handler Reply with quote



Hi,

I'm searching for a component by name like this

ComboBox = (TComboBox *)Form->FindComponent(strName);

and then changing its selected item

ComboBox->ItemIndex = 0;

Since the OnChange-handler of ComboBox isn't activated this way I have to
call it myself.
But how do I get the specific event handler?

Mark


Back to top
Antonio Felix
Guest





PostPosted: Thu Jun 24, 2004 5:02 pm    Post subject: Re: Event handler Reply with quote




"Mark" <anightinc (AT) gmx (DOT) net> wrote:
Quote:
Hi,

I'm searching for a component by name like this

ComboBox = (TComboBox *)Form->FindComponent(strName);

and then changing its selected item

ComboBox->ItemIndex = 0;

Since the OnChange-handler of ComboBox isn't activated this way I have to
call it myself.
But how do I get the specific event handler?

Mark



Call it like;

OnChangeHandlerName(ComboBox);

ComboBox will be the Sender sent to the Event Handler.

HTH
Antonio

Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Jun 24, 2004 5:16 pm    Post subject: Re: Event handler Reply with quote




"Mark" <anightinc (AT) gmx (DOT) net> wrote


Quote:
Since the OnChange-handler of ComboBox isn't activated
this way I have to call it myself. But how do I get the specific
event handler?

You can call it like this:

if( ComboBox->OnChange )
ComboBox->OnChange(ComboBox);


Gambit



Back to top
Mark
Guest





PostPosted: Thu Jun 24, 2004 5:25 pm    Post subject: Re: Event handler Reply with quote

Thanks to both of you!

Mark


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.