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 default font used to display cell text.
Get
VB.NET | refFontObj = object.Font As System.Drawing.Font |
VB | Set refFontObj = object.Font As IFontDisp |
C#.NET | System.Drawing.Font refFontObj = object.Font; |
VC++ | IFontDisp* refFontObj = object->GetFont(); |
C | HRESULT object->get_Font(IFontDisp** refFontObj); |
Put
VB.NET | object.let_Font(ByVal refFontObj As System.Drawing.Font) |
VB | object.Font = refFontObj As IFontDisp |
C#.NET | void object.let_Font(System.Drawing.Font refFontObj); |
VC++ | void object->PutFont(IFontDisp* refFontObj); |
C | HRESULT object->put_Font(IFontDisp* refFontObj); |
PutRef
VB.NET | object.Font = refFontObj As System.Drawing.Font |
VB | Set object.Font = refFontObj As IFontDisp |
C#.NET | System.Drawing.Font object.Font = refFontObj; |
VC++ | void object->PutRefFont(IFontDisp* refFontObj); |
C | HRESULT object->putref_Font(IFontDisp* refFontObj); |
object
refFontObj
Defines the default font used to display cell text. For information about font properties, please visit the applicable section "Using SftBox/OCX with ...".
The Font property defines the default font used to display cell text.
The Cell.Font property can be used to override an individual cell's font. The Headers.Font and RowHeaders.Font properties are used to define the fonts used to display the column and row headers.
The font used for the edit control portion is defined using the Edit.Font property.
Private Sub closeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles closeButton.Click Application.Exit() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BoldFont = New Font(SftBox1.Font, FontStyle.Bold) ItalicFont = New Font("Arial", 8, FontStyle.Italic) Dim index As Integer SftBox1.BulkUpdate = True For index = 0 To 29 If index = 4 Then AddOneItem("Item " & index, "This cell text is very long", "Cell " & index & ",2") ElseIf index = 7 Then AddOneItem("Item " & index, "Cell " & index & ",1", "This cell text is also very long")
private void closeButton_Click(object sender, System.EventArgs e) { Application.Exit(); } private void Form1_Load(object sender, System.EventArgs e) { BoldFont = new Font(SftBox1.Font, FontStyle.Bold); ItalicFont = new Font("Arial", 8, FontStyle.Italic); int index; SftBox1.BulkUpdate = true; for (index = 0 ; index < 30 ; ++index) { if (index == 4) AddOneItem("Item " + index, "This cell text is very long", "Cell " + index + ",2"); else if (index == 7)
ASSERT(SUCCEEDED(hr)); PictDesc.bmp.hbitmap = LoadBitmap(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDB_PIN)); hr = OleCreatePictureIndirect(&PictDesc, IID_IPictureDisp, TRUE, (void**)&m_pIPictureDispPin); ASSERT(SUCCEEDED(hr)); PictDesc.bmp.hbitmap = LoadBitmap(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDB_SPECIAL)); hr = OleCreatePictureIndirect(&PictDesc, IID_IPictureDisp, TRUE, (void**)&m_pIPictureDispSpecial); ASSERT(SUCCEEDED(hr)); vBox1->putref_Font(NULL); // use the form's default font vBox1->Edit->putref_Font(NULL); vBox1->RowHeaders->putref_Font(NULL); // make a bold font IFontPtr pFont = vBox1->GetFont(); IFontPtr pFontNew; hr = pFont->Clone(&pFontNew); ASSERT(SUCCEEDED(hr));
See Also SftBox Object | Object Hierarchy