Manage Learn to apply best practices and optimize your operations.

Focusing views by default when frames are launched

When using multiple databases with a common navigation framework, views often are not focused by default when launched within frames. This tip resolves the issue.

View member feedback to this tip.

When using multiple databases with a common navigation framework, views often are not focused by default when launched within frames. This causes an annoying issue for end-users, as they have to click on the view to set the focus. This tip is simple and resolves this issue once and for all.

1) Create Notes form (called dlgFocus). Within the form, create a layout region, and make it as small as possible.

2) In Post Open event of the form type:

source.close()

This will force the form to close immediatly after it has been opened.

3) In the Post Open event of the view you want to launch, add this code:

Dim session As New NotesSession
 Dim ws As New NotesUIWorkspace
 Dim dbCurrent As NotesDatabase
 
 Set dbCurrent = session.currentDatabase
 Call ws.DialogBox("dlgFocus",True,True,,,,,,
dbCurrent.GetDocumentByUNID(source.View.UniversalID))

When the view is launch, the code will run and will force the dlgFocus to open but immediatly close it as per instructions in step 2, leaving you with the focus on the view.

MEMBER FEEDBACK TO THIS TIP

We have discovered a feature for bookmarking these framesets via drag and dropping the window to the bookmark bar. It might become the view that gets bookmarked instead of the frameset. If so, one possible error could be that the window-title contains "-" somehow. If that is removed, it works much better again.

—Palle L.

******************************************

In the Frame selection in Designer, all you need to do is set the checkbox on the second tab to "Set Initial Focus ".

—Mark H.

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Jose Zaldivar. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our bimonthly tip contest and you could win a prize and a spot in our Hall of Fame.

Dig Deeper on LotusScript

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close