[Gambas-user] File Chooser OK event?

Rolf-Werner Eilert eilert-sprachen at ...221...
Thu Dec 19 12:32:55 CET 2013


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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list