ListFieldTrueFalse |
包含关于 Microsoft FrontPage 列表中 Boolean 真/假域的信息。ListFieldTrueFalse 对象允许您为用户提供一个简单的二进制用户界面选项。
下列示例创建名为 Default Page 的 fpFieldTrueFalse 类型的新域。该子例程显示了新域的名称以及将此域添加到的列表的名称。
Sub CreateTrueFalseField()
'Add new TrueFalse field
Dim objApp As FrontPage.Application
Dim objLstFlds As ListFields
Dim strName As String
Set objApp = FrontPage.Application
Set objLstFlds = objApp.ActiveWeb.Lists.Item(0).Fields
strName = "Default Page"
'Add new Field of type fpFieldTrueFalse to list
objLstFlds.Add Name:=strName, Description:="Determines if this is " & _
"default page", Fieldtype:=fpFieldTrueFalse
MsgBox "A new field named " & strName & " was added to the list " & _
objApp.ActiveWeb.Lists.Item(0).Name & "."
End Sub