• Browse Blogs
  • My Blog
  • My Updates

+Tags Get help with tags?

  • View as cloud  | list

+ Similar Blogs

photo

Lotus Nut

111 Entries |  Chris Whisonant
Updated 
RatingsRatings 23     CommentsComments 157
photo

Big Mutant Bl...

49 Entries |  Michael Smelser
Updated 
RatingsRatings 1     CommentsComments 49
photo

Yellow is the...

72 Entries |  Tim Tripcony
Updated 
RatingsRatings 2     CommentsComments 34
photo

Patrick Picar...

62 Entries |  Patrick Picard
Updated 
RatingsRatings 2     CommentsComments 112
photo

off the Hook ...

53 Entries |  Scott Hooks
Updated 
RatingsRatings 6     CommentsComments 81

+ Blog Authors  

All entries tagged with show-and-tell-thursday

1 - 2 of 2
  • Previous
  • Next
  • Page   1

SNTT - Custom tabs in Notes client

Karl-Henry Martinsson |   | Tags:  sntt development show-and-tell-thursday | Comments (4)  |  Visits (547)

 We all know that Notes let us create tabbed tables. But you have limits to how nice you can create the tabs.

In an application I am working on, I wanted full control of the tabs, and I found out it was actually pretty easy to create my own tabs. I just used a computed background, something I actually never used before.

By the way, I stoleborrowed the graphics from Yahoo Mail for now, until I get the final graphics created...

 

The application displays information about the (insurance) claim selected in the drop-down box. Each claim has one or more claimants (affected people/parties), and I display them in the tabbed section. You can see the tabs in the screenshot below.

 

What I simply do is to keep track of the currently selected claimant, the number of claimants, and then I built a table with 3 columns in the first row and one merged cell as the second row.

In the center cell in the first row, I set the background to the "active colored" (lighter) tab. I use @Formulas to set the background in the two other cells:

@If( @TextToNumber(CurrentClaimantNumber) > 1; "CCdb_InactiveTab.gif"; "" )

and

@If( @TextToNumber(CurrentClaimantNumber) < @TextToNumber(LNPClaimantCount); "CCdb_InactiveTab.gif"; "" )

 

The inactive tab is the darker one. Then it is just a question about writing code that trigger when the lables (computed-for-display fields) are clicked, to update the current claimant value, load the claimant data and refresh the form.

 

I hope you get some inspiration from this. Oh, and this is all Notes 5...

No RatingsRatings 0

SNTT: Lists - the forgotten gem in Lotusscript

Karl-Henry Martinsson |   | Tags:  show-and-tell-thursday programming sntt lotusscript | Comments (2)  |  Visits (447)
OK, I know it is Friday already, but here is my Show-n-Tell-Thursday entry...

Lists are a data type that I don't think is used enough. Many Notes developers, even some that been programming in the environment for years, don't use this very powerful feature. In previous years, Bill Buchan have been talking about lists in some of his Lotussphere sessions, and when asking how many in the audience that used lists, less than 10% raised their hands.

So what are lists? They are a data type, similar to an array, but instead of using a numeric index, it uses a string as index, or tag as it is called.

This makes it easy to address items in the list, check if they exists, etc.

Here is a simple example:

Dim age List as Integer

Dim name as String

age( "karl" ) = 38

age( "erik" ) = 7

name = InputBox$( "Enter name:" )

If IsElement(age(Lcase(name))) = True Then

MsgBox name & " is " & age(lcase(name)) & " years old."

Else

MsgBox name & " does not occur in the list."

End If

This code define a list of integers, containing the age of two people. When a name is entered in the input box, IsElement is used to check if an item with that name is found in the list. If it is, the age is displayed, if not another message is displayed, saying that the name was not found.

Note that the list tag (name in this case) is case sensitive! 

To loop through a list and display all the values, use ForAll. Here is an example where we loop thorugh all the entries and display their list tags as well as the values:

Dim age List As Integer
age( "Karl" ) = 38
age( "Erik" ) = 7
Forall a In age
Msgbox Listtag(a) & " is " & a & " years old."
End Forall

Some of the things I use lists for are web agents, where I parse the URL passed for parameters, and build a list of them. Then it is very easy to write code that check for parameters and get the value if they exist.

I wrote an article about lists for The View, published in November/December 2006. You can find more details and examples there.

No RatingsRatings 0

  • Previous
  • Next
Jump to page of 1
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About