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 entry font.
Get
VB.NET | refFontObj = object.Font As System.Drawing.Font refFontObj = object.Font As stdole.IFontDisp Note |
VB | Set refFontObj = object.Font As IFontDisp |
C#.NET | System.Drawing.Font refFontObj = object.Font; stdole.IFontDisp refFontObj = object.Font; Note |
VC++ | IFontDisp* refFontObj = object->GetFont(); |
C | HRESULT object->get_Font(IFontDisp** refFontObj); |
Put
VB.NET | object.let_Font(ByVal refFontObj As stdole.IFontDisp) Note |
VB | object.Font = refFontObj As IFontDisp |
C#.NET | void object.let_Font(stdole.IFontDisp refFontObj); Note |
VC++ | void object->PutFont(IFontDisp* refFontObj); |
C | HRESULT object->put_Font(IFontDisp* refFontObj); |
PutRef
VB.NET | object.Font = refFontObj As System.Drawing.Font object.Font = refFontObj As stdole.IFontDisp Note |
VB | Set object.Font = refFontObj As IFontDisp |
C#.NET | System.Drawing.Font object.Font = refFontObj; stdole.IFontDisp object.Font = refFontObj; Note |
VC++ | void object->PutRefFont(IFontDisp* refFontObj); |
C | HRESULT object->putref_Font(IFontDisp* refFontObj); |
object
refFontObj
Defines the default entry font.
The Font property defines the default entry font.
If an entry has been modified by the end-user and the new settings have not yet been saved (using Save), the entry uses the ModifiedFont property instead.
The font used for the header is defined using the Header.Font property.
Using PutRef (see Syntax above) the control will use the reference to the Font object. If the Font object is later changed, this will also affect the font used by the control. Using Put instead, causes the control to create a copy of the Font object. If the Font object is later changed, this will not affect the font used by the control as it uses a copy of the object. Because of the additional overhead and the increased resource use of Put, PutRef is the preferred method.
Dim ItalicFont As New Font("Times New Roman", 12, FontStyle.Italic) AxSftOptions1.Font = ItalicFont AxSftOptions1.Add("", "Topic1", "Sample Topic", _ SftOptionsEntryConstants.entrySftOptionsTopic, _ "", "", Nothing, "", "", "", "") AxSftOptions1.InitializationComplete()
SftOptions1.Font.Name = "Times New Roman" SftOptions1.Font.Italic = True SftOptions1.Font.Size = 12 SftOptions1.Add "", "Topic1", "Sample Topic", entrySftOptionsTopic, "", "", Nothing, "", "", "", "" SftOptions1.InitializationComplete
Font ItalicFont = new Font("Times New Roman", 12, FontStyle.Italic); axSftOptions1.Font = ItalicFont; axSftOptions1.Add("", "Topic1", "Sample Topic", SftOptionsEntryConstants.entrySftOptionsTopic, "", "", null, "", "", "", ""); axSftOptions1.InitializationComplete();
ISftOptionsPtr vOptions1 = m_Options1.GetControlUnknown(); IFontDispPtr pFontDisp = vOptions1->GetFont(); IFontPtr pFont = pFontDisp; pFont->put_Name(L"Times New Roman"); CY size; size.int64 = 10*10000L; //10 point font pFont->put_Size(size); pFontDisp = vOptions1->GetModifiedFont(); pFont = pFontDisp; pFont->put_Name(L"Times New Roman"); size.int64 = 10*10000L; //10 point font pFont->put_Size(size); pFont->put_Bold(TRUE); vOptions1->Add(_bstr_t(""), _bstr_t("Topic1"), _bstr_t("Sample Topic"), entrySftOptionsTopic, _bstr_t(""), _bstr_t(""), NULL, _bstr_t(""), _bstr_t(""), _bstr_t(""), _bstr_t("")); vOptions1->Add(_bstr_t("Topic1"), _bstr_t("Cb1"), _bstr_t("Check Box 1"), entrySftOptionsCheckBox, _bstr_t(""), _bstr_t(""), NULL, _bstr_t(""), _bstr_t(""), _bstr_t(""), _bstr_t("")); vOptions1->Add(_bstr_t("Topic1"), _bstr_t("Cb2"), _bstr_t("Check Box 2"), entrySftOptionsCheckBox, _bstr_t(""), _bstr_t(""), NULL, _bstr_t(""), _bstr_t(""), _bstr_t(""), _bstr_t("")); vOptions1->Add(_bstr_t("Topic1"), _bstr_t("Cb3"), _bstr_t("Check Box 3"), entrySftOptionsCheckBox, _bstr_t(""), _bstr_t(""), NULL, _bstr_t(""), _bstr_t(""), _bstr_t(""), _bstr_t("")); vOptions1->InitializationComplete();
SftOptions1.Add('', 'Topic1', 'Sample Topic', entrySftOptionsTopic, '', '', nil, '', '', '', ''); SftOptions1.Font.Name := 'Times New Roman'; SftOptions1.Font.Style := [ fsItalic ]; SftOptions1.Font.Size := 12; SftOptions1.InitializationComplete();
See Also SftOptions Object | Object Hierarchy