Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Builder to realize menu function in IE in C++

Shulou Source: shulou.com Published: 2022-05-31 22:20:40 10月04日 Update

This article mainly explains "how to use Builder in C++ to achieve the menu function in IE", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to use Builder in C++ to achieve the menu function in IE".

C++Builder is only an ISO standard, which specifies the basic syntax of C++ and the corresponding semantics of these grammars (which can be simply understood as the meaning of syntax). To really apply C++ to actual programming, only one standard is not enough.

TControlBar+TToolbar+TImageList this method and the above method is more or less the same, except that the TCoolBar can be replaced with TControlBar can be pulled, here is not cumbersome to explain. The following picture shows the effect.

Three. Put the drop-down menu on the function button menu

This is the most commonly used menu in IE and can be easily implemented in C++Builder.

Step 1: place a TMainMenu control on the form (Form) and set the content

Step 2: set the Menu property of Tform to empty

Step 3: place a TControlbar and then a TToolbar on top of the TControlbar

Step 4: set the ShowCaptions property of TToolBar to true

Step 5: add several TToolButton to TToolBar and modify its caption to simulate the main menu

Step 6: set the grouped property of TTollBar to true

Step 7: set the menuitem of each TToolButton to the main menu item of MainMenu

Step 8: set the flat property of TToolBar to true

Run the program, and the result is as follows, and you get a drop-down menu that is the same as IE on the function button menu. The drop-down menu in the function button menu is really cool', isn't it? Well, so far, I believe readers have some understanding of C++Builder menu design (including pull-down menus and function button menus), which will help us to further design a more beautiful and practical user interface.

At this point, I believe you have a deeper understanding of "how to use Builder in C++ to achieve menu functions in IE". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Menus steps functions clips properties buttons content methods standards syntax drop-down design utility just practical program learning deeper beautiful cumbersome Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Linux Huawei OPPO Reno MariaDB