tailieunhanh - Beginning Microsoft Visual C# 2008 PHẦN 5

Các nhà xây dựng cũng sẽ có thể để có một danh sách ban đầu của các mục thông qua một tham số Danh sách . Lớp nên hoạt động chính xác như Bộ sưu tập nhưng ném một ngoại lệ IndexOutOfRangeException loại nếu một nỗ lực được | Part II Windows Programming 2. Name the three controls ToolStripMenuItemBold ToolStripMenuItemItalic and ToolStripMenuItemUnderline. 3. Add a Toolstrip to the form. In the Actions Window click Insert Standard Items. Select and delete the items for Cut Copy Paste and the Separator after them. When you insert the Toolstrip the RichTextBox may fail to dock properly. If that happens change the Dock style to none and manually resize the control to fill the form. Then change the Anchor property to Top Bottom Left Right . 4. Create three new buttons and a separator at the end of the toolbar by selecting Button three times and Separator once. Click on the last item in the ToolStrip to bring up those options. 5. Create the final two items by selecting ComboBox from the drop-down list and then adding a separator as the last item. 6. Select the Help item and drag it from its current position to the position as the last item in the toolbar. 7. The first three buttons are going to be the Bold Italic and Underline buttons respectively. Name the controls as shown in the following table ToolBarButton Name Bold button ToolStripButtonBold Italic button ToolStripButtonItalic Underline button ToolStripButtonUnderline ComboBox ToolStripComboBoxFonts 8. Select the Bold button click on the ellipses . in the Image property select the Project Resource File radio button and click Import. If you ve downloaded the source code for this book use the three images found in the folder Chapter16 Toolbars Images and . Note that the default extensions suggested by Visual Studio do not include ICO so when browsing for the icons you will have to choose Show All Files from the drop-down. 9. Select for the image of the Bold button. 10. Select the Italic button and change its image to . 11. Select the Underline button and change its image to . 504 Chapter 16 Advanced Windows Forms Features 12. Select the ToolStripComboBox. In the Properties panel set .

crossorigin="anonymous">
Đã 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.