Show full path in the title bar

I want to show the full path on the title bar. I have not found any setting that allows that.

Request for enhancement, please add there your comment. Show current file name AND path in titlebar, Add an option to show the full path in the window title,

Questions to the same effect were asked more than once:
For users wanting to get a solution without needing to wait for the success of a feature request, I posted user code here: How to view 'full path' of open document?.

I currently use myself the following version, where the first two Sub are assigned to the respective events by Customize for the application.

Please note that the Basic IDE uses the .Title of a document in the left panel where the libraries and modules are displayed. If the paths are very long this may result in an annoyance. To shorten the Title a bit, I prefer to not include the protocol part if urlStyle is chosen.

Sub onViewCreated()
showFileLocationInTitleBar(False)
End Sub

Sub onDoumentSavedAs()
showFileLocationInTitleBar(False)
End Sub

Sub showFileLocationInTitleBar(Optional pUrlStyle As Boolean)
If IsMissing(pUrlStyle) Then pUrlStyle = True
url = ThisComponent.URL
If url = "" Then Exit Sub REM The document was not yet stored.
If pUrlStyle Then
  pN = Split(url, "://")(1)
Else
  pN = ConvertFromURL(url)
End If
ThisComponent.Title = pN
End Sub  

I don’t work with remote files. With pUrlStyle=False remote files may cause errors. You can include a test. Please report your experiences in this case.

2 Likes