PC SOFT

WINDEV的在线文档

  • Image associated with an element
  • Associating one or more images with an element
  • Format of images
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Associating an image with the elements of a TreeView control

Image associated with an element
Each element found in a TreeVew control is preceded by an image. This image can differ according to the status of the current element (or level). You can display an image:
  • when the level is expanded,
  • when the level is collapsed (or when the level corresponds to a leaf).
Example of TreeView control in an WinDev application:

Image associated with the collapsed level: for example:

Image associated with the expanded level: for example:

Note: You also have the ability to associate an identifier with an element. See Associating an identifier with an element for more details.

Associating one or more images with an element
To associate one or more images with an element of a TreeView control, all you have to do is specify the name (and the path if necessary) of the image in the following programming functions:
树视图添加在树视图控件中添加一个";叶子";元素(以及所有必要的节点)。
树视图插入将一个叶节点插入到一个树视图控件的一个指定位置。
树视图修改在树视图控件里修改一个元素(节点或工作表)。

Note: If no specific image is associated with the elements of a TreeView control, the "closed folder" icon () and the "opened folder" icon () are used.

Format of images
Windows支持的图片格式为:
  • Bitmap (*.BMP)
  • 图形交换格式(*.gif)
  • 联合图像专家小组(*.jpg ; *.jpeg)
  • 柯达照片CD(*.pcd)
  • PaintBrush(*.pcx)
  • Adobe Photoshop格式(*.psd)
  • TrueVision TARGA(*.tga)
  • 标记图像文件格式(*.tif ; *.tiff)
    注意: 不支持tiff 6.0标准的"tiled tiff"选项。 在这种情况下,我们建议您以tiff 5.0标准储存图片。
  • Portable Network Graphics (*.png)
  • Windows元文件(*.emf ; *.wmf)
  • 图标(*.ico ; *.icw)
  • 光标(*.CUR) *.cur
  • Portable Document Format (*.pdf)
  • 15版本和更高版本
    Scalable Vector Graphics (*.svg)
    15新版本
    Scalable Vector Graphics (*.svg)
    Scalable Vector Graphics (*.svg)
注意: 若想管理pdf和svg格式,您必须为Windows 2000以及更低版本的计算机安装GDIPLUS.DLL。 对于更高的版本,该DLL由Windows默认提供。 想了解更多信息,请查阅GDI+框架

The images used can be:

Notes:
  • The specified image is proportionally reduced: the height of the image corresponds to the height of the row in the TreeView control. The size of the images used should be set to 16x16 pixels (size of the small WinDev icons).
  • The magenta color found in the images is considered as being transparent at run time.