Re: "dynamic" menu creation with Winlib32
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 27, 2001
- 458 views
Hi Stefano, I just tried this and it worked okay. Can you check that you have "onClick_Recent" spelt correctly, especially uppercase/lowercase letters. ----- Original Message ----- From: "Stefano" <webmaster at tupamaros.com> To: "EUforum" <EUforum at topica.com> Subject: "dynamic" menu creation with Winlib32 > > Hi all, > I want to add, at the end of a menu, a list of "recent files opened". > > I've no problem adding, updating, removing the menu items. > The problem raise when I click on one of this menu entries: nothing > happen: it seems like the events doesn't trigger. > > I'll paste a piece of code.. it's surely more explanatory than my > english)... > > global sequence recent_files, menu_recent > global holdSep, hold > > procedure build_recent_list() > menu_recent={} > if length(recent_files) then > holdSep = create( MenuItem, "-", Menu_file, 0, 0, 0, 0, 0 ) > for i=1 to length(recent_files) do > hold = create(MenuItem, recent_files[i], Menu_file, 0, 0, 0, 0, 0) > onClick[hold] = routine_id("onClick_OpenRecent") > setEnable(hold,1) > menu_recent&={hold} > end for > end if > end procedure > > sorry again for my bad english... > > stefano > > >