Bob Stanton wrote:
>logman0u812 wrote: > > >>Procedure TForm1.AssignMenuItemClickEvents; >>var >> i,x: integer; >>Begin >> for i := 0 to ComponentCount - 1 do begin >> if (Components[i] is TMenuItem) then >> TMenuItem(Components[i]).OnClick := ClickMyMenuItem; >> end; >>End; >> >> >Thnk You ! > >This seems an easy way to do it. > >I was considering writing a new component. > > > Just a minor aside to point out, in case it's not obvious already, that you can in effect do this at designtime too, in the IDE. (I get the impression that you don't realise that you can assign the same event handler to multiple events inside the IDE, in Delphi. Once you'ved created one event handler, just go to the other popup menuitem's events, and drop down the event selector and select the existing handler you've already created instead of double clicking. Note, you can also rename event handlers. Just overtype the name given by Delphi in the object inspector, and Delphi will change the source code declaration and implementation for you.) Regards Walter [Non-text portions of this message have been removed] ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/