SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines the font used for this cell.
Get
| VB.NET | refFontObj = object.Font As stdole.IFontDisp |
| VB | Set refFontObj = object.Font As IFontDisp |
| C#.NET | stdole.IFontDisp refFontObj = object.Font; |
| VC++ | IFontDisp* refFontObj = object->GetFont(); |
| C | HRESULT object->get_Font(IFontDisp** refFontObj); |
Put
| VB.NET | object.let_Font(ByVal refFontObj As stdole.IFontDisp) |
| VB | object.Font = refFontObj As IFontDisp |
| C#.NET | void object.let_Font(stdole.IFontDisp refFontObj); |
| VC++ | void object->PutFont(IFontDisp* refFontObj); |
| C | HRESULT object->put_Font(IFontDisp* refFontObj); |
PutRef
| VB.NET | object.Font = refFontObj As stdole.IFontDisp |
| VB | Set object.Font = refFontObj As IFontDisp |
| C#.NET | stdole.IFontDisp object.Font = refFontObj; |
| VC++ | void object->PutRefFont(IFontDisp* refFontObj); |
| C | HRESULT object->putref_Font(IFontDisp* refFontObj); |
object
refFontObj
Defines the font used for this cell. For information about font properties, please visit the applicable section "Using SftBox/OCX with ...".
The Font property defines the font used for this cell.
This property overrides the control's Font property, the default font. To remove an individual cell's font, set the property to Nothing (0, null, NULL) which will restore the default font defined using the Font property.
When overriding a cell's font in a fixed height combo box control, the new font size must be smaller or equal to the default font, otherwise text may be clipped vertically as the item height cannot be adjusted. Cell text is centered vertically and horizontally based on the Cell.TextVAlign and Cell.TextHAlign properties.
countryList.Columns.MakeOptimal(0)
countryList.Items.RecalcHorizontalExtent(0)
End Sub
Private Sub AddCompany(ByVal CompName As String, ByVal NotUsed1 As String, ByVal NotUsed2 As String, ByVal Address As String, ByVal City As String, ByVal State As String, ByVal ZIP As String, ByVal Country As String, ByVal Phone As String, ByVal Fax As String)
Dim index As Integer
index = companyList.Items.Add(CompName)
If Country = "United States" Then
companyList.get_Cell(index, 0).let_Font(OLECvt.ToIFontDisp(BoldFont))
companyList.get_Cell(index, 0).Image.NETImageObject = pictureBox1.Image
companyList.get_Cell(index, 0).ImageHAlign = SftBoxHAlignConstants.halignSftBoxRight
End If
companyList.get_Cell(index, 1).Text = Address
companyList.get_Cell(index, 2).Text = City
companyList.get_Cell(index, 3).Text = State
companyList.get_Cell(index, 4).Text = ZIP
CompanyList.Items.Sort -1, SortedColumn, Direction
End Sub
Private Sub AddCompany(ByVal CompName As String, ByVal NotUsed1 As String, ByVal NotUsed2 As String, ByVal Address As String, ByVal City As String, ByVal State As String, ByVal ZIP As String, ByVal Country As String, ByVal Phone As String, ByVal Fax As String)
Dim Index As Long
With CompanyList.Direct
Index = .Items.Add(CompName)
If Country = "United States" Then
Set .Cell(Index, 0).Font = BoldFont
Set .Cell(Index, 0).Image.Picture = PictureSpecial.Picture
.Cell(Index, 0).ImageHAlign = halignSftBoxRight
End If
.Cell(Index, 1).Text = Address
.Cell(Index, 2).Text = City
.Cell(Index, 3).Text = State
.Cell(Index, 4).Text = ZIP
countryList.Items.RecalcHorizontalExtent(0);
}
private void AddCompany(string CompName, string NotUsed1, string NotUsed2, string Address, string City, string State, string ZIP, string Country, string Phone, string Fax)
{
int index;
index = companyList.Items.Add(CompName);
if (Country == "United States") {
companyList.get_Cell(index, 0).let_Font(OLECvt.ToIFontDisp(BoldFont));
companyList.get_Cell(index, 0).Image.NETImageObject = pictureBox1.Image;
companyList.get_Cell(index, 0).PictureAlign = SftBoxAlignConstants.constSftBoxRight;
}
companyList.get_Cell(index, 1).Text = Address;
companyList.get_Cell(index, 2).Text = City;
companyList.get_Cell(index, 3).Text = State;
companyList.get_Cell(index, 4).Text = ZIP;
void CDataInputDlg::AddCompany(LPCTSTR CompName, LPCTSTR NotUsed1, LPCTSTR NotUsed2, LPCTSTR Address, LPCTSTR City, LPCTSTR State, LPCTSTR ZIP, LPCTSTR Country, LPCTSTR Phone, LPCTSTR Fax)
{
long index;
ISftBoxPtr vCompanyList = m_CompanyList.GetControlUnknown();
index = vCompanyList->Items->Add(CompName);
if (lstrcmp(Country, "United States") == 0) {
vCompanyList->Cell[index][0]->putref_Font(m_pBoldFont);
vCompanyList->Cell[index][0]->Image->PutRefPicture(m_pIPictureDispBullet);
vCompanyList->Cell[index][0]->ImageHAlign = halignSftBoxRight;
}
vCompanyList->Cell[index][1]->Text = Address;
vCompanyList->Cell[index][2]->Text = City;
vCompanyList->Cell[index][3]->Text = State;
vCompanyList->Cell[index][4]->Text = ZIP;
vCompanyList->Cell[index][5]->Text = Country;See Also SftBoxCell Object | Object Hierarchy
