Re: How to programaticaly call an event handler (or force the event to occur programatically)
"Tony Cappellini" <[email protected]> Sun, 6 Jan 2008 14:44:19 -0800
| Newsgroups | gmane.comp.python.pythoncard |
|---|---|
| Message-ID | <[email protected]> |
I've got a combo box update event handler that is called when the user makes a selection in the combo box. When the event handler is called, other controls are updated accordingly. However, this only occurs when the screen is visible, and the user makes a selection. During initialization, I want to select a default item in the combo box, and I want the other controls to be updated accordingly, just as if the user had made the selection. Sure, I can manually add code to do this, but it seems like it's better to jsut use the built in event handlers, and simulate a selection in the combo box, so I dont need to duplicate the code which updates the other controls. Does this explain the issue more clearly? thanks On Jan 6, 2008 2:38 PM, John Henry <[email protected]> wrote: > I kind of get what you are trying to do but just to be > sure, can you elaborate a bit because I might be able > to answer it. I do a lot of creating controls such as > buttons on the fly. > > --- Tony Cappellini <[email protected]> wrote: > > > I have a Radio Group with two buttons in it. > > I can't call the event handler programmatically > > because event needs to > > be passed. > > > > When I tried setting one of the radio buttons > > programmatically, the > > event handler never was called. > > > > How can I force the event to be generated by setting > > one of the > > buttons programmatically? > > > > thanks > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio > > 2005. > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Pythoncard-users mailing list > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > > > > -- > John Henry > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/