Class SegmentIdColumn
Column that shows the segment ID for segment rows. For non-segment rows it shows only the default background color.
Inherited Members
Namespace: Sdl.DesktopEditor.EditorApi.Implementation
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public class SegmentIdColumn : RowNumberColumn, IInteractiveCustomColumn, ICustomColumn
Remarks
The optimal column width is determined by measuring the size of the
text in the Max
If segment IDs other than sequential numbers are used this will mean that the segment ID may not fit on a single line in the column. If this is the case the ID will be wrapped across multiple lines.
Constructors
SegmentIdColumn()
Default constructor.
Declaration
public SegmentIdColumn()
Remarks
The optimal column width is determined by measuring the size of the
text in the Max
If segment IDs other than sequential numbers are used this will mean that the segment ID may not fit on a single line in the column. If this is the case the ID will be wrapped across multiple lines.
Properties
MaxWidthRowId
If set the text of this property will be measured to determine the optimal column width.
Declaration
public string MaxWidthRowId { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
If not set the optimal column width is determined from the number of rows in the document, where it is assumed that segments are numbered sequentially and that the largest segment number that may need to be shown is less than the total number of rows in the edit control.
Methods
GetOptimalWidth(Graphics)
Overridden to measure the text in Max
Declaration
public override int GetOptimalWidth(Graphics g)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g |
Returns
Type | Description |
---|---|
Int32 |
Overrides
Remarks
The optimal column width is determined by measuring the size of the
text in the Max
If segment IDs other than sequential numbers are used this will mean that the segment ID may not fit on a single line in the column. If this is the case the ID will be wrapped across multiple lines.
GetText(IRowInfo)
Overridden to return the segment ID for segment rows and null
for other rows.
Declaration
protected override string GetText(IRowInfo row)
Parameters
Type | Name | Description |
---|---|---|
IRow |
row |
Returns
Type | Description |
---|---|
String |
Overrides
Remarks
The optimal column width is determined by measuring the size of the
text in the Max
If segment IDs other than sequential numbers are used this will mean that the segment ID may not fit on a single line in the column. If this is the case the ID will be wrapped across multiple lines.