TAILIEUCHUNG - Mastering Microsoft Visual Basic 2008 phần 4

coi là minh bạch cho tất cả các hình ảnh (màu sắc này còn được gọi là màu sắc quan trọng). Các hình ảnh sẽ được thay đổi kích cỡ phù hợp bằng cách kiểm soát khi họ đang hiển mà hình ảnh là một đối tượng hình ảnh với hình ảnh mong muốn. Bạn thường sẽ gọi phương pháp này như sau: | 310 chapter 9 THE TREEVIEW AND LISTVIEW CONTROLS treated as transparent for all images this color is also known as the key color . The images will be resized accordingly by the control as they re displayed. FIGURE The Images Collection Editor dialog box The other method of adding images to an ImageList control is to call the Add method of the Images collection which contains all the images stored in the control. To add an image at runtime you must first create an Image object with the image or icon you want to add to the control and then call the Add method as follows image where image is an Image object with the desired image. You will usually call this method as follows path where path is the full path of the file with the image. The Images collection of the ImageList control is a collection of Image objects not the files in which the pictures are stored. This means that the image files need not reside on the computer on which the application will be executed as long as they have been added to the collection at design time. The TreeView Control Let s start our discussion with a few simple properties that you can set at design time. To experiment with the properties discussed in this section open the TreeViewDemo project. The project s main form is shown in Figure . After setting some properties they are discussed next run the project and click the Populate button to populate the control. After that you can click the other buttons to see the effect of the various property settings on the control. THE TREEVIEW CONTROL 311 Figure The TreeViewDemo project demonstrates the basic properties and methods of the TreeView control. Here are the basic properties that determine the appearance of the control ShowCheckBoxes If this property is True a check box appears in front of each node. If the control displays check boxes you can select multiple nodes otherwise you re limited to a single selection. .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.