Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext


Jason Sas 7.Aug.08 01:07 AM a Web browser
Domino Designer 6.5.6; 6.5.5 FP3; 6.5.5 FP2; 6.5.5 FP1; 6.5.5; 6.5.4 FP3; 6.5.4 FP2; 6.5.4 FP1; 6.5.4; 6.5.3 FP2; 6.5.3 FP1; 6.5.3; 6.5.2 FP1; 6.5.2; 6.5.1; 6.5 Windows XP


Hi guys,

We would like to be able to change the size of a fields font on a form based on a setting on another field that we set.

To begin with I'm just trying to see if I can change the size of a fields font when the form opens. By 'default', the size and font of the field is set to Arial 11. I have placed some code in 'PostOpen' of the form which tries to set the font to courier and the size to 14. When the form opens however, it is still set to Arial 11. A sample of the script I am using is shown below in the first part of the script. Can anyone point me in the right direction?

Sub Postopen(Source As Notesuidocument)
Dim session As New notessession
Dim docstatus As String
Dim user1 As String
Dim user2 As String
Dim allowedit As String
Dim doc As NotesDocument
Dim richstyle As NotesRichTextStyle

Set doc = Source.Document
Set richstyle = session.CreateRichTextStyle
richstyle.NotesFont = FONT_COURIER
richstyle.FontSize = 14

Dim richtext As New NotesRichTextItem(doc, "IssuesAndComments")
Call richtext.AppendStyle(richstyle)



If Source.IsNewDoc Then
Call source.FieldSetText( "DocStatus", "Locked" )
Call source.FieldSetText("Currentuser", session.commonusername)
update = True
Exit Sub
End If

allowedit = Source.FieldGetText("AllowEdit")
If allowedit = "False" Then
Source.EditMode = False
update = False
Exit Sub
End If



'don't let any one make changes if a newer version of this document exists.
saveOption = source.FieldGetText("SaveOptions")
If saveOption = "0" Then
source.EditMode = False
Exit Sub
End If

user1 = session.commonusername
user2 = Source.FieldGetText("Currentuser")
docstatus = Source.FieldGetText("DocStatus")


If source.EditMode And docstatus = "Open" Then


Call source.FieldSetText( "DocStatus", "Locked" )
Call source.FieldSetText("Currentuser", user1)
update = True
Call source.refresh
Call source.save
End If

If source.EditMode And docstatus = "Locked" And user1 = user2 Then
Source.EditMode = False
update = False
Call Source.Close
Msgbox "This document is already open in another window"
End If

End Sub

Cheers,
Jason






Changing font size 'dynamically' (Jason Sas 7.Aug.08)
. . RE: Changing font size 'dynamically... (Melissa L Snell... 7.Aug.08)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite