Ask Your Question
0

Feature request: Show sheet name in calc window title

asked 2015-01-09 15:03:41 +0100

Tilman gravatar image

I am working on a really big, complicated calc document with many sheets. In this settings, it's helpful to have multiple windows open on the same document showing different sheets.

It would be very helpful if each window title would include the currently shown sheet, so I can easily find the right window when switching windows.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-01-09 22:48:52 +0100

JohnSUN gravatar image

updated 2016-01-26 11:28:07 +0100

If you want workaround just set this code to Standard library

Sub SetTitleForThisFrame
Dim sURL As String
Dim aStr
Dim nameOfActiveSheet As String
Dim oCurrentController As Variant
Dim nameOfDocument As String
Dim sTitle As String
    sURL = ThisComponent.getURL()
    If sURL="" Then Exit Sub
    aStr = Split(sURL,"/")
    nameOfDocument = ConvertFromURL(aStr(UBound(aStr)))
    oCurrentController = ThisComponent.getCurrentController()
    nameOfActiveSheet = "{"+oCurrentController.getActiveSheet().getName()+"} "
    sTitle = InputBox ("Input name for this frame", "New name", nameOfActiveSheet+nameOfDocument)
    oCurrentController.getFrame().setTitle(sTitle)
End Sub

and run it for each new window of workbook. No need "sheet name", you can set any nick

Update: See this small example, please - NamewWindows.ods

edit flag offensive delete link more

Comments

Thanks for the hint! (Sorry, only now saw it!) One question: Is there some kind of hook that gets run when the page is switched, so I could run that automatically?

Tilman gravatar imageTilman ( 2016-01-23 00:58:00 +0100 )edit

What about listeners on events "View created" and "PropertyChanged" (ViewData)? I'm attach example to my answer

JohnSUN gravatar imageJohnSUN ( 2016-01-26 11:30:26 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-01-09 15:03:41 +0100

Seen: 122 times

Last updated: Jan 26 '16