Skip to content

MaxPreviewLines Property

See Also

See Also


Description

The maximum number of lines of the PreviewText that will be displayed while in PreviewMode.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property MaxPreviewLines() As Long

Remarks

You can add as many lines of text in the PreviewText property; only the number of lines specified in MaxPreviewLines will be displayed while in PreviewMode.

Example

How to Change the Maximum Number of Preview Text Lines That Are Displayed (Visual Basic)

This sample illustrates how to change the maximum number of lines that will be displayed from the preview text while in PreviewMode.

' This sample illustrates how to add PreviewText to a GridRecord  
' And how to change the number of lines that will be displayed while in PreviewMode  

Dim Record As GridRecord  
Dim Item As GridRecordItem  

' Adds a record  
Set Record = wndGridControl.Records.Add  

' Only 2 lines of the PreviewText will be displayed  
wndGridControl.PaintManager.MaxPreviewLines = 2  

' Only the first 2 lines will be displayed while in PreviewMode  
' Because MaxPreviewLines has been set to 2.  
Record.PreviewText = "RE: Your Invoice (From: John Smith)" & _  
                     vbCrLf & "John Smith" & _  
                     vbCrLf & "19/06/2004" & _  
                     vbCrLf & "18K"  

Set Item = Record.AddItem("")  
Item.HasCheckbox = True  
Item.Checked = False  
Record.AddItem "RE: Your Invoice"  
Record.AddItem "John Smith"  
Record.AddItem "19/06/2004"  
Record.AddItem "18k"

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.