Android Question Sub Commenting - with Copy Code Example

Jack Cole

Well-Known Member
Licensed User
Longtime User
It is very handy to be able to hit Copy in the comment that pops up for the description of certain custom functions. Is there a way for everyone to do this? Can I insert something to tell the IDE to make the code below appear as example code that can be copied to the clipboard?

upload_2019-10-2_8-21-30.png
 

DonManfred

Expert
Licensed User
Longtime User
you can add comments to the lines direct before a sub/method of a library...

B4X:
'Finds the file with the given name. If not found creates a new file.
Public Sub FindFileOrCreate (Parent As ExternalFile, Name As String) As ExternalFile
    Dim f As ExternalFile = FindFile(Parent, Name)
    If f.IsInitialized = False Then
        Return CreateNewFile(Parent, Name)
    Else
        Return f
    End If
End Sub

this is from the external storage class.... if you use yourclassname.FindFileOrCreate a popup appears showing the Text

Finds the file with the given name. If not found creates a new file.
 
Upvote 0

Similar Threads

Top