Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting default focus tab on tabbed table 1

Status
Not open for further replies.

ABOzIT

IS-IT--Management
May 1, 2003
226
JP
I have a form that contains a tabbed table. The tabs a programatically selected using and outline. I'm trying to give the first tab of the table default focus when the document is opened. The first tab contains quite a lot of text so I cannot put it outside of the table. I'm trying to keep things neat.

Most users will be opening this document in read only mode. They will not have edit access. This really restricts my options as most of the functions or methods (like GoToField) only work in Edit Mode.

If anyone has any ideas on setting the focus tab in read only mode I'd really appreciate it.

Thanks!
 
Straight forward (almost). The following command will not need EDIT access to change tab:
@COMMAND([RefreshHideFormulas]);

To make it work:
- The table must be of type 'switch rows programmatically' and tabbed, and with no add'l buttons the selection 'Also show tabs so user can pick row' should be selected.
- The table has to have a name (Name/ID in table properties), which must be prefixed with '$' in front when formula and/or LotusScript is used...

Set the initial focus with a few lines of Lotus Script, in e.g. something like this (Example: table is called 'MyTable' and row is called 'Basic'):
- In 'QueryOpen' event:
If (Not (Source.IsNewDoc)) Then
Call note.ReplaceItemValue("$MyTable", "Basic")
End If

- In 'PostOpen' event:
If (Source.IsNewDoc) Then
Call Source.Document.ReplaceItemValue("$MyTable", "Basic")
Call Source.Refresh()
End If

- If you prefer to use buttons, create a double set of normal Notes buttons (or graphics if you like) and set proper hide/when conditions
So for button to activate/select the above, the following code is placed:
FIELD $MyTable := "Basic";
@Command([RefreshHideFormulas])

I normally create 2 buttons within one table cell with different colors. When a button is pushed, the second button becomes visible to indicate the active tab, and of course the pressed one goes hidden...

You can also look into domino designer help for examples on the above, try searching for 'switch rows programmatically'... Hope it helps :)




Brgds,

TrooDOS
 
Thanks TrooDOS!

I already had the tabbed table working, but the "Gem" in the middle was what I was looking for.

Have a "Star" on me!!

Cheers!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top