You are right, I now did it the old way with separate buttons. But I'm still interested in seeing how this would work, so if someone could explain...
Regards Rolf Am 19.12.2013 14:04, schrieb Caveat: > Looks like you have to use (at least) Activate (OK) and Cancel (Errrm > Cancel!)... pffft seems simpler the way I had it! ;-) > > Public Sub FileChooser2_Cancel() > > Print "Cancel fired" > > End > > Public Sub FileChooser2_Activate() > > Print "Activate fired!" > > End > > Kind regards, > Caveat > > On 19/12/13 13:11, Rolf-Werner Eilert wrote: >> Ok, I see. >> >> You activate this by Show Button = True in the form dialog. The help >> says "Return or set if the standard ../../dialog buttons ('OK' and >> 'Cancel') are visible or not." >> >> And this doesn't help me a lot... ;) >> >> Rolf >> >> >> Am 19.12.2013 12:48, schrieb Caveat: >>> I have a pbDone and a pbCancel button on my form. I'm guessing that if >>> you are using the File Chooser's built-in OK/Cancel buttons (where have >>> you found that and how are you enabling that ??) that you will have to >>> handle them in a similar way... so making a new File Chooser As ... if >>> from code, or just sticking it on the form if using the designer... >>> >>> Kind regards, >>> Caveat >>> >>> On 19/12/13 12:32, Rolf-Werner Eilert wrote: >>>> pbDone_Click() >>>> >>>> Where does that come from? >>>> >>>> >>>> >>>> Am 19.12.2013 12:15, schrieb Caveat: >>>>> And here's the code from the form containing the File Chooser... >>>>> >>>>> Having sent you all this, I realise it perhaps doesn't really answer >>>>> your question (sorry!) but perhaps there's enough in here about raising >>>>> and handling events that it becomes clear how to use the OK and Cancel >>>>> events from the File Chooser itself, should you still wish to do so... :-D >>>>> >>>>> ' Done Event is raised only if Done button pressed and a file has been >>>>> chosen and >>>>> ' returns the chosen file name and the (earlier) provided fileNumber >>>>> ' See below for details of fileNumber >>>>> Event Done(fileName As String, fileNumber As Integer) >>>>> ' Allows us to keep track of which file we're dealing with if there are >>>>> multiple places >>>>> ' where you can choose a file on the main Form >>>>> ' It's returned to the main Form on the Done event >>>>> Private fileNumber As Integer >>>>> >>>>> Public Sub pbCancel_Click() >>>>> >>>>> Me.Close >>>>> >>>>> End >>>>> >>>>> Public Sub pbDone_Click() >>>>> >>>>> If FileChooser2.SelectedPath = "" Then >>>>> Message.Error("No file chosen! Cancel to return without >>>>> selecting >>>>> a file") >>>>> Return >>>>> Endif >>>>> Raise Done(FileChooser2.SelectedPath, fileNumber) >>>>> Me.Close >>>>> >>>>> End >>>>> >>>>> Public Sub setFileNumber(newFileNumber As Integer) >>>>> >>>>> fileNumber = newfileNumber >>>>> >>>>> End >>>>> >>>>> Public Sub setRoot(newRoot As String) >>>>> >>>>> FileChooser2.Root = newRoot >>>>> >>>>> End >>>>> >>>>> Public Sub setFilter(newFilter As String) >>>>> >>>>> FileChooser2.Filter = newFilter >>>>> >>>>> End >>>>> >>>>> Kind regards, >>>>> Caveat >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Rapidly troubleshoot problems before they affect your business. Most IT >>>>> organizations don't have a clear picture of how application performance >>>>> affects their revenue. With AppDynamics, you get 100% visibility into your >>>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics >>>>> Pro! >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>> ------------------------------------------------------------------------------ >>>> Rapidly troubleshoot problems before they affect your business. Most IT >>>> organizations don't have a clear picture of how application performance >>>> affects their revenue. With AppDynamics, you get 100% visibility into your >>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics >>>> Pro! >>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>> >>> ------------------------------------------------------------------------------ >>> Rapidly troubleshoot problems before they affect your business. Most IT >>> organizations don't have a clear picture of how application performance >>> affects their revenue. With AppDynamics, you get 100% visibility into your >>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics >>> Pro! >>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> ------------------------------------------------------------------------------ >> Rapidly troubleshoot problems before they affect your business. Most IT >> organizations don't have a clear picture of how application performance >> affects their revenue. With AppDynamics, you get 100% visibility into your >> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics >> Pro! >> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> . >> > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user