TAILIEUCHUNG - Professional VB 2005 - 2006 phần 6

Đặt một nút ở góc dưới bên phải của biểu mẫu, và thiết lập thuộc tính Neo cho các nút hại và phải. Sau đó, đặt hai hộp văn bản trong FlowLayoutPanel, giữ kích thước mặc định của họ. Các hình thức mà bạn đã tạo ra nên bây giờ trông giống như hình 14-14. | Chapter 14 Place a button in the bottom-right corner of the form and set the Anchor property for the button to Bottom and Right. Then place two text boxes in the FlowLayoutPanel keeping their default sizes. The form you have created should now look much like that in Figure 14-14. Simpo PDF Merge and Split Unregistered Version - http Figure 14-14 Now run the application. The initial layout will be similar to the design-time layout. However if you resize the form to about half of its original width the layout of the text boxes will change. Since there is no longer enough room for them to be arranged side by side the arrangement will automatically switch and the form will look more like that in Figure 14-15. Figure 14-15 Padding and Margin properties To assist in positioning controls in the FlowLayoutPanel all controls have a new property called Margin. There are settings for and . These settings determine how much space is reserved around a control when calculating its automatic position in a FlowLayoutPanel. You can see the Margin property in action by changing the Margin property for one or more of the text boxes in the previous example. If you change all the Margin settings for the first Textbox to 20 pixels for example and run the application the form will look like Figure 14-16. 518 Windows Forms The first text box now has a 20 pixel separation from all the other controls in the FlowLayoutPanel as well as a 20 pixel separation from the edges of the FlowLayoutPanel itself. The Padding property is for the FlowLayoutPanel or other container control. When a control is embedded into a FlowLayoutPanel the and of the FlowLayoutPanel determine how far away from the inside edge of the container to position the control. You can see the Padding property in action by changing the Padding property for the FlowLayoutPanel in the previous example. .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.