tailieunhanh - Programming Microsoft Windows with C# phần 8

Công cụ Tùy chọn, và mở rộng nút thiết kế HTML. Chọn nút định vị CSS, kiểm tra "Thay đổi vị trí sau cho các điều khiển" tùy chọn, và chọn "Hoàn toàn vị trí" trong hộp kết hợp. Lưu ý rằng đây là một thiết lập toàn cầu sẽ ảnh hưởng đến tất cả các hình thức web tiếp theo. Hình 4-4 cho thấy các hộp thoại Options. | Notice the normal period separating the namespace and the enumeration name and also the comma preceding the library name. The library name must include version information which is the reason for the call. The program obtains the enumeration member names and values from the static GetNames and GetValues methods of the Enum class. The relationship between the library name and the namespace can be a bit tricky The library contains the namespace . However is also located in . Many of the basic namespaces such as System and are located in which stands for Microsoft Core Library. Notice the use of the StringBuilder class to build the string that s displayed in the read-only text box. I discuss StringBuilder in Appendix C. The original version put everything into the text box line-byline using string appending with the operator. I was beginning to suspect a problem with that approach when the EmfPlusRecordType enumeration required 30 seconds to display using a prerelease version of Visual studio .NET and my pokey machine. Switching to the StringBuilder class made the update instantaneous. The List Box The ListBox control is often used in a manner similar to a group of radio buttons to provide a way for a user to pick one item from a list of several items. However list boxes generally take up less space on the screen and also let the user select multiple items. The ComboBox control which I ll talk about later in this chapter usually takes up even less space and often includes an area for the user to type information much like a TextBox control. Both ListBox and ComboBox are derived from ListControl as shown in the following class hierarchy Usually after creating a list box you want to fill it with items. You do that using the Items property ListBox Properties selection Type Property Accessibility ListBox. Objectcollection Items get The .

TỪ KHÓA LIÊN QUAN