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 text font used for the header.
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 text font used for the header.
The Font property defines the text font used for the header.
The control's Font property is used to define the font for entries.
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 ItalFont As New Font("Times New Roman", 12, FontStyle.Italic) AxSftOptions1.Header.Font = OLECvt.ToOLE_IFontDisp(ItalFont) AxSftOptions1.Header.Style = SftOptionsHeaderStyleConstants.headerSftOptionsButton AxSftOptions1.Header.Text = "Options" AxSftOptions1.Add("", "Topic1", "Sample Topic", SftOptionsEntryConstants.entrySftOptionsTopic, "", "", Nothing, "", "", "", "") AxSftOptions1.InitializationComplete()
SftOptions1.Header.Font.Name = "Times New Roman" SftOptions1.Header.Font.Italic = True SftOptions1.Header.Font.Size = 12 SftOptions1.Header.Style = headerSftOptionsButton SftOptions1.Header.Text = "Options" SftOptions1.Add "", "Topic1", "Sample Topic", entrySftOptionsTopic, "", "", Nothing, "", "", "", "" SftOptions1.InitializationComplete
Font ItalFont = new Font("Times New Roman", 12, FontStyle.Italic); axSftOptions1.Header.Font = OLECvt.ToOLE_IFontDisp(ItalFont); axSftOptions1.Header.Style = SftOptionsHeaderStyleConstants.headerSftOptionsButton; axSftOptions1.Header.Text = "Options"; axSftOptions1.Add("", "Topic1", "Sample Topic", SftOptionsEntryConstants.entrySftOptionsTopic, "", "", null, "", "", "", ""); axSftOptions1.InitializationComplete();
ISftOptionsPtr vOptions1 = m_Options1.GetControlUnknown(); IFontDispPtr pFontDisp = vOptions1->Header->GetFont(); IFontPtr pFont = pFontDisp; pFont->put_Name(L"Times New Roman"); CY size; size.int64 = 12*10000L; //10 point font pFont->put_Size(size); pFont->put_Italic(TRUE); vOptions1->Header->Style = headerSftOptionsButton; vOptions1->Header->Text = "Options"; 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->InitializationComplete();
//var f : TFont; f := TFont.Create(); SetOleFont(f, SftOptions1.Header.Font); f.Name := 'Times New Roman'; f.Size := 12; f.Style := [fsItalic]; SftOptions1.Header.Style := headerSftOptionsButton; SftOptions1.Header.Text := 'Options'; SftOptions1.Add('', 'Topic1', 'Sample Topic', entrySftOptionsTopic, '', '', nil, '', '', '', ''); SftOptions1.InitializationComplete();
See Also SftOptionsHeader Object | Object Hierarchy