How can I bold the entire column?
VBA (MS Access, Excell...)
With List1
Set var_ConditionalFormat = .ConditionalFormats.Add("1")
With var_ConditionalFormat
.Bold = True
.ApplyTo = 0
End With
.Columns.Add "Column"
.Items.Add 0
.Items.Add 1
End With
VB6
With List1
Set var_ConditionalFormat = .ConditionalFormats.Add("1")
With var_ConditionalFormat
.Bold = True
.ApplyTo = exFormatToColumns
End With
.Columns.Add "Column"
.Items.Add 0
.Items.Add 1
End With
VB.NET
Dim var_ConditionalFormat
With Exlist1
var_ConditionalFormat = .ConditionalFormats.Add("1")
With var_ConditionalFormat
.Bold = True
.ApplyTo = exontrol.EXLISTLib.FormatApplyToEnum.exFormatToColumns
End With
.Columns.Add("Column")
.Items.Add(0)
.Items.Add(1)
End With
VB.NET for /COM
Dim var_ConditionalFormat
With AxList1
var_ConditionalFormat = .ConditionalFormats.Add("1")
With var_ConditionalFormat
.Bold = True
.ApplyTo = EXLISTLib.FormatApplyToEnum.exFormatToColumns
End With
.Columns.Add("Column")
.Items.Add(0)
.Items.Add(1)
End With
C++
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXLISTLib' for the library: 'ExList 1.0 Control Library'
#import <ExList.dll>
using namespace EXLISTLib;
*/
EXLISTLib::IListPtr spList1 = GetDlgItem(IDC_LIST1)->GetControlUnknown();
EXLISTLib::IConditionalFormatPtr var_ConditionalFormat = spList1->GetConditionalFormats()->Add(L"1",vtMissing);
var_ConditionalFormat->PutBold(VARIANT_TRUE);
var_ConditionalFormat->PutApplyTo(EXLISTLib::exFormatToColumns);
spList1->GetColumns()->Add(L"Column");
spList1->GetItems()->Add(long(0));
spList1->GetItems()->Add(long(1));
C++ Builder
Exlistlib_tlb::IConditionalFormatPtr var_ConditionalFormat = List1->ConditionalFormats->Add(L"1",TNoParam());
var_ConditionalFormat->Bold = true;
var_ConditionalFormat->ApplyTo = Exlistlib_tlb::FormatApplyToEnum::exFormatToColumns;
List1->Columns->Add(L"Column");
List1->Items->Add(TVariant(0));
List1->Items->Add(TVariant(1));
C#
exontrol.EXLISTLib.ConditionalFormat var_ConditionalFormat = exlist1.ConditionalFormats.Add("1",null);
var_ConditionalFormat.Bold = true;
var_ConditionalFormat.ApplyTo = exontrol.EXLISTLib.FormatApplyToEnum.exFormatToColumns;
exlist1.Columns.Add("Column");
exlist1.Items.Add(0);
exlist1.Items.Add(1);
JavaScript
<OBJECT classid="clsid:1B0CA5A8-2107-4460-BBEE-F25F8801B2F6" id="List1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
var var_ConditionalFormat = List1.ConditionalFormats.Add("1",null);
var_ConditionalFormat.Bold = true;
var_ConditionalFormat.ApplyTo = 0;
List1.Columns.Add("Column");
List1.Items.Add(0);
List1.Items.Add(1);
</SCRIPT>
C# for /COM
EXLISTLib.ConditionalFormat var_ConditionalFormat = axList1.ConditionalFormats.Add("1",null);
var_ConditionalFormat.Bold = true;
var_ConditionalFormat.ApplyTo = EXLISTLib.FormatApplyToEnum.exFormatToColumns;
axList1.Columns.Add("Column");
axList1.Items.Add(0);
axList1.Items.Add(1);
X++ (Dynamics Ax 2009)
public void init()
{
COM com_ConditionalFormat;
anytype var_ConditionalFormat;
;
super();
var_ConditionalFormat = COM::createFromObject(exlist1.ConditionalFormats()).Add("1"); com_ConditionalFormat = var_ConditionalFormat;
com_ConditionalFormat.Bold(true);
com_ConditionalFormat.ApplyTo(0/*exFormatToColumns*/);
exlist1.Columns().Add("Column");
exlist1.Items().Add(COMVariant::createFromInt(0));
exlist1.Items().Add(COMVariant::createFromInt(1));
}
Delphi 8 (.NET only)
with AxList1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Nil);
with var_ConditionalFormat do
begin
Bold := True;
ApplyTo := EXLISTLib.FormatApplyToEnum.exFormatToColumns;
end;
Columns.Add('Column');
Items.Add(TObject(0));
Items.Add(TObject(1));
end
Delphi (standard)
with List1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Null);
with var_ConditionalFormat do
begin
Bold := True;
ApplyTo := EXLISTLib_TLB.exFormatToColumns;
end;
Columns.Add('Column');
Items.Add(OleVariant(0));
Items.Add(OleVariant(1));
end
VFP
with thisform.List1
var_ConditionalFormat = .ConditionalFormats.Add("1")
with var_ConditionalFormat
.Bold = .T.
.ApplyTo = 0
endwith
.Columns.Add("Column")
.Items.Add(0)
.Items.Add(1)
endwith
dBASE Plus
local oList,var_ConditionalFormat
oList = form.Activex1.nativeObject
var_ConditionalFormat = oList.ConditionalFormats.Add("1")
var_ConditionalFormat.Bold = true
var_ConditionalFormat.ApplyTo = 0
oList.Columns.Add("Column")
oList.Items.Add(0)
oList.Items.Add(1)
XBasic (Alpha Five)
Dim oList as P
Dim var_ConditionalFormat as P
oList = topparent:CONTROL_ACTIVEX1.activex
var_ConditionalFormat = oList.ConditionalFormats.Add("1")
var_ConditionalFormat.Bold = .t.
var_ConditionalFormat.ApplyTo = 0
oList.Columns.Add("Column")
oList.Items.Add(0)
oList.Items.Add(1)
Visual Objects
local var_ConditionalFormat as IConditionalFormat
var_ConditionalFormat := oDCOCX_Exontrol1:ConditionalFormats:Add("1",nil)
var_ConditionalFormat:Bold := true
var_ConditionalFormat:ApplyTo := exFormatToColumns
oDCOCX_Exontrol1:Columns:Add("Column")
oDCOCX_Exontrol1:Items:Add(0)
oDCOCX_Exontrol1:Items:Add(1)
PowerBuilder
OleObject oList,var_ConditionalFormat
oList = ole_1.Object
var_ConditionalFormat = oList.ConditionalFormats.Add("1")
var_ConditionalFormat.Bold = true
var_ConditionalFormat.ApplyTo = 0
oList.Columns.Add("Column")
oList.Items.Add(0)
oList.Items.Add(1)
Visual DataFlex
Procedure OnCreate
Forward Send OnCreate
Variant v
Variant voConditionalFormats
Get ComConditionalFormats to voConditionalFormats
Handle hoConditionalFormats
Get Create (RefClass(cComConditionalFormats)) to hoConditionalFormats
Set pvComObject of hoConditionalFormats to voConditionalFormats
Get ComAdd of hoConditionalFormats "1" Nothing to v
Send Destroy to hoConditionalFormats
Variant var_ConditionalFormat
Move v to var_ConditionalFormat
Set ComBold to True
Set ComApplyTo to OLEexFormatToColumns
Variant voColumns
Get ComColumns to voColumns
Handle hoColumns
Get Create (RefClass(cComColumns)) to hoColumns
Set pvComObject of hoColumns to voColumns
Get ComAdd of hoColumns "Column" to Nothing
Send Destroy to hoColumns
Variant voItems
Get ComItems to voItems
Handle hoItems
Get Create (RefClass(cComItems)) to hoItems
Set pvComObject of hoItems to voItems
Get ComAdd of hoItems 0 to Nothing
Send Destroy to hoItems
Variant voItems1
Get ComItems to voItems1
Handle hoItems1
Get Create (RefClass(cComItems)) to hoItems1
Set pvComObject of hoItems1 to voItems1
Get ComAdd of hoItems1 1 to Nothing
Send Destroy to hoItems1
End_Procedure
XBase++
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL var_ConditionalFormat
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
var_ConditionalFormat := oList:ConditionalFormats:Add("1")
var_ConditionalFormat:Bold := .T.
var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/
oList:Columns():Add("Column")
oList:Items():Add(0)
oList:Items():Add(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN