Type | Description | |||
Value as Long | A long expression that defines a predefined value. | |||
Caption as String | A string expression that indicates the caption for the Value. The Caption supports HTML format. | |||
Image as Variant | A long expression that indicates the index of the item's icon. |
The Caption property supports the following built-in HTML tags:
or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:
The following VB sample adds some checks to a CheckListType editor:
With Record1 .BeginUpdate With .Add("CheckListType", CheckListType) .AddItem &H1, "ReadOnly", 1 .AddItem &H2, "Hidden", 2 .AddItem &H4, "System", 3 .AddItem &H10, "Directory", 4 .AddItem &H20, "Archive", 5 .AddItem &H80, "Normal", 7 .AddItem &H100, "Temporary", 8 .Value = &H1 + &H2 End With .EndUpdate End With
The following VC sample add some checks to a CheckListType editor:
COleVariant vtMissing; vtMissing.vt = VT_ERROR; CEditor editor = m_record.Add(COleVariant("CheckListType"), /*CheckListType*/ 6, vtMissing ); editor.AddItem( 0x01, "ReadOnly", vtMissing ); editor.AddItem( 0x02, "Hidden", vtMissing ); editor.AddItem( 0x04, "System", vtMissing ); editor.AddItem( 0x10, "Directory", vtMissing ); editor.AddItem( 0x20, "Archive", vtMissing ); editor.AddItem( 0x80, "Normal", vtMissing ); editor.AddItem( 0x100, "Temporary", vtMissing ); editor.SetValue( COleVariant( (long)(0x01 + 0x02) ) ); m_record.Refresh();