ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

ValueItems.AnnotatePicture Property

Gets or sets a value indicating whether both Value and Display Value are rendenered when Display value is an image.

[Visual Basic]

Public Property AnnotatePicture As Boolean

[C#]

public bool AnnotatePicture {get;set;}

[Delphi]

public property AnnotatePicture: Boolean read get_AnnotatePicture write set_AnnotatePicture;

Remarks

If True, both text and graphics are displayed in a cell when all of the following conditions are met:

·      The Presentation property of the ValueItems object is set to any value except RadioButton.

·      The Translate property of the ValueItems object is set to True.

·      The underlying data value for a cell matches the ValueItem.Value property of a ValueItem member.

·      The corresponding ValueItem.DisplayValue contains a bitmap, not text.

If False (the default), matching cells are rendered as the ValueItem.Value or ValueItem.DisplayValue setting, depending upon the value of the Translate property.

When both text and graphics are displayed, the horizontal placement of the bitmap with respect to the cell text is determined by the Style.HorizontalAlignment and Style.ForeGroundPicturePosition properties of the column's Style object. For example, if Style.HorizontalAlignment is set to Center, and Style.ForeGroundPicturePosition is set to Left, the bitmap is placed at the left edge of the cell, and the cell text is centered in the remaining space. For more information, see Displaying Foreground Pictures.

When editing, the editor uses all space available in the text portion of the cell. If the Presentation property is set to one of the combo box options, the bitmap will not change until editing is completed.

Example

The following code allows both the ValueItem.Value text and the ValueItem.DisplayValue image to appear in the cell:

·      Visual Basic

       Me.C1TrueDBGrid1.Columns("Country").ValueItems.AnnotatePicture = True

·      C#

       this.c1TrueDBGrid1.Columns["Country"].ValueItems.AnnotatePicture = true;

·      Delphi

       Self.C1TrueDBGrid1.Columns['Country'].ValueItems.AnnotatePicture := True;

For more information on the AnnotatePicture property, see Displaying Both Text and Pictures in a Cell.

See Also

ValueItems Class | ValueItems Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.