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 desired image width.
Get
VB.NET | WPix = object.Width As Integer |
VB | WPix = object.Width As Long |
C#.NET | int WPix = object.Width; |
VC++ | long WPix = object->Width; long WPix = object->GetWidth(); |
C | HRESULT object->get_Width(long* WPix); |
Put
VB.NET | object.Width = WPix As Integer |
VB | object.Width = WPix As Long |
C#.NET | int object.Width = WPix; |
VC++ | long object->Width = WPix; void object->PutWidth(long WPix); |
C | HRESULT object->put_Width(long WPix); |
object
A SftPictureObject object.
WPix
Defines the desired image width.
The Width property defines the desired image width.
The desired image width is only used for built-in images (SftPictureObject.Type is sftTypeBuiltin) and color samples (SftPictureObject.Type is sftTypeColorSample). For all image types, the SftPictureObject.ActualHeight and SftPictureObject.ActualWidth properties reflect the image dimensions.
PropagateImage(ItemIndex, C.Image) End Sub Private Sub UpdateColor(ByVal ItemIndex As Integer, ByVal Clr As System.Drawing.Color, ByVal Align As SftTreeHAlignConstants) Dim C As SftTreeCell C = AxSftTree1.get_Cell(ItemIndex, 0) C.Image.SetColorSample(Convert.ToUInt32(ColorTranslator.ToOle(Clr) And &HFFFFFFFF&), _ Convert.ToUInt32(ColorTranslator.ToOle(Color.Black) And &HFFFFFFFF&)) C.Image.Width = 12 C.Image.Height = 12 C.ImageHAlign = Align PropagateImage(ItemIndex, C.Image) End Sub Private Sub AddColor(ByVal Text As String, ByVal Clr As Color) Dim i As Integer
C.ImageHAlign = Align PropagateImage ItemIndex, C.Image End Sub Private Sub UpdateColor(ByVal ItemIndex As Integer, ByVal Clr As OLE_COLOR, ByVal Align As SftTreeHAlignConstants) Dim C As SftTreeCell Set C = SftTree1.Cell(ItemIndex, 0) C.Image.SetColorSample Clr, vbBlack C.Image.Width = 12 C.Image.Height = 12 C.ImageHAlign = Align PropagateImage ItemIndex, C.Image End Sub Private Sub AddColor(ByVal Text As String, ByVal Clr As OLE_COLOR) Dim I As Integer
C.ImageHAlign = Align; PropagateImage(ItemIndex, C.Image); } private void UpdateColor(int ItemIndex, System.Drawing.Color Clr, SftTreeHAlignConstants Align) { SftTreeCell C = axSftTree1.get_Cell(ItemIndex, 0); C.Image.SetColorSample((uint) ColorTranslator.ToOle(Clr), (uint) ColorTranslator.ToOle(Color.Black)); C.Image.Width = 12; C.Image.Height = 12; C.ImageHAlign = Align; PropagateImage(ItemIndex, C.Image); } private void AddColor(string Text, Color Clr) {
C->ImageHAlign = Align; PropagateImage(ItemIndex, C->Image); } void CPicturesDlg::UpdateColorSample(long ItemIndex, COLORREF Clr, SftTreeHAlignConstants Align) { ISftTreeCellPtr C = m_vTree->Cell[ItemIndex][0]; C->Image->SetColorSample(Clr, 0x80000000L|COLOR_WINDOWTEXT); C->Image->Width = 12; C->Image->Height = 12; C->ImageHAlign = Align; PropagateImage(ItemIndex, C->Image); } void CPicturesDlg::AddBuiltinImage(LPCTSTR lpszName, SftPictureImageConstants Appearance, long Width, long Height) {
See Also SftPictureObject Object | Object Hierarchy