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 picture used for the entry.
Get
VB.NET | refPictureObj = object.Picture As stdole.IPictureDisp |
VB | Set refPictureObj = object.Picture As IPictureDisp |
C#.NET | stdole.IPictureDisp refPictureObj = object.Picture; |
VC++ | IPictureDisp* refPictureObj = object->GetPicture(); |
C | HRESULT object->get_Picture(IPictureDisp** refPictureObj); |
Put
VB.NET | object.let_Picture(ByVal refPictureObj As stdole.IPictureDisp) |
VB | object.Picture = refPictureObj As IPictureDisp |
C#.NET | void object.let_Picture(stdole.IPictureDisp refPictureObj); |
VC++ | void object->PutPicture(IPictureDisp* refPictureObj); |
C | HRESULT object->put_Picture(IPictureDisp* refPictureObj); |
PutRef
VB.NET | object.Picture = refPictureObj As stdole.IPictureDisp |
VB | Set object.Picture = refPictureObj As IPictureDisp |
C#.NET | stdole.IPictureDisp object.Picture = refPictureObj; |
VC++ | void object->PutRefPicture(IPictureDisp* refPictureObj); |
C | HRESULT object->putref_Picture(IPictureDisp* refPictureObj); |
object
refPictureObj
Defines the picture used for the entry.
The Picture property defines the picture used for the entry. The image is used for Topic and Ellipse entries only (see Entry.Type).
If the Picture object refPictureObj defines a bitmap, the top, left pixel of the bitmap must contain the bitmap's background color. This color will be replaced throughout the bitmap with the actual background (see Bitmap Transparency).
The images can be of varying sizes. The entry height is automatically adjusted so images and text are never clipped vertically.
To remove an individual entry picture, set the property to Nothing (0, null, NULL), which will restore the default image defined using the DefaultTopicPicture property.
Using PutRef (see Syntax above) the control will use the reference to the Picture object. If the Picture object is later changed, this will also affect the image used by the control. Using Put instead causes the control to create a copy of the Picture object. If the Picture object is later changed, this will not affect the image 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.
' A picture box is used to hold the bitmap for the topic's Picture property. A ' suitable bitmap has been defined in the picture box using its Image property. AxSftOptions1.Add("", "Topic1", "Sample Topic", SftOptionsEntryConstants.entrySftOptionsTopic, "", "", Nothing, "", "", "", "") AxSftOptions1.Add("", "Topic2", "Sample Topic", SftOptionsEntryConstants.entrySftOptionsTopic, "", "", Nothing, "", "", "", "") AxSftOptions1.get_Entry("Topic2").Picture = OLECvt.ToOLE_IPictureDisp(PictureBox1.Image) AxSftOptions1.InitializationComplete()
' A picture box is used to hold the bitmap for the topic's Picture property. A ' suitable bitmap has been defined in the picture box using its Picture property. SftOptions1.Add "", "Topic1", "Sample Topic", entrySftOptionsTopic, "", "", _ Nothing, "", "", "", "" SftOptions1.Add "", "Topic2", "Sample Topic", entrySftOptionsTopic, "", "", _ Nothing, "", "", "", "" SftOptions1.Entry("Topic2").Picture = Picture1.Picture SftOptions1.InitializationComplete
// A picture box is used to hold the bitmap for the topic's Picture property. A // suitable bitmap has been defined in the picture box using its Image property. axSftOptions1.Add("", "Topic1", "Sample Topic", SftOptionsEntryConstants.entrySftOptionsTopic, "", "", null, "", "", "", ""); axSftOptions1.Add("", "Topic2", "Sample Topic", SftOptionsEntryConstants.entrySftOptionsTopic, "", "", null, "", "", "", ""); axSftOptions1.get_Entry("Topic2").Picture = OLECvt.ToOLE_IPictureDisp(pictureBox1.Image); axSftOptions1.InitializationComplete();
ISftOptionsPtr vOptions1 = m_Options1.GetControlUnknown(); IPictureDispPtr pIPictureDisp; PICTDESC PictDesc; PictDesc.cbSizeofstruct = sizeof(PICTDESC); PictDesc.picType = PICTYPE_ICON; PictDesc.icon.hicon = LoadIcon(NULL, MAKEINTRESOURCE(IDI_APPLICATION)); HRESULT hr = OleCreatePictureIndirect(&PictDesc, IID_IPictureDisp, TRUE, (void**)&pIPictureDisp); ASSERT(SUCCEEDED(hr)); 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(""), _bstr_t("Topic2"), _bstr_t("Sample Topic"), entrySftOptionsTopic, _bstr_t(""), _bstr_t(""), NULL, _bstr_t(""), _bstr_t(""), _bstr_t(""), _bstr_t("")); vOptions1->Entry["Topic2"]->PutRefPicture(pIPictureDisp); vOptions1->InitializationComplete();
// uses ActiveX // var pic: IPictureDisp; // A TImage control is used to hold the bitmap for the topic's Picture property. A suitable // bitmap has been defined in the image control using its Picture property. SftOptions1.Add('', 'Topic1', 'Sample Topic', entrySftOptionsTopic, '', '', nil, '', '', '', ''); SftOptions1.Add('', 'Topic2', 'Sample Topic', entrySftOptionsTopic, '', '', nil, '', '', '', ''); GetOlePicture(Image1.Picture, pic); SftOptions1.Entry['Topic2'].Picture := pic; SftOptions1.InitializationComplete();
See Also SftOptionsEntry Object | Object Hierarchy