Add Automatic Scrolling Toolbar for Delphi program

Source: Internet
Author: User

This example makes a toolbar that can be automatically scrolled.

Add a timagelist component to the form and add several image files to it. Then add a Ttoolbar component, set the Ttoolbar component's images property to the Timagelist component, right-click on the Ttoolbar component, select the New button item in the pop-up shortcut menu, add a few buttons for the Ttoolbar component, and set the ImageIndex property of the button to correspond to the image index number in the Timagelist component respectively. Finally, add a Tpagescroller component to the form, set its AutoScroll property value to True, set the control property to the Ttoolbar component, and if the Ttoolbar component is larger than the size of the Tpagescroller component, A button is displayed.

The design-completed form is shown in Figure 1.

Figure 1 Main interface

Save the file, and then press F9 to run the program, the initial picture of the program running as shown in Figure 2.

As the program runs, the toolbar automatically scrolls to show the rest of the toolbar as the mouse moves to or on the button, as shown in Figure 3.

 

Figure 2 Initial screen of program operation

Figure 3 Program Run results

If you set the AutoScroll property value of the Tpagescroller component to False, the toolbar will automatically scroll to show the rest of the toolbar when the program is running, only when you click or button.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.