Gossip BCB (III)

Source: Internet
Author: User

ItemsIt's never used in your program

You have never seen such a statement:

......

StatusBar1-> Panels-> Items [0]-> Text = "Have you ever seen me ?";

......

RadioGroup1-> Items-> Add ("Have you ever seen me ?");

......

MnEdit-> Items [0]-> Visible = false; // you are not allowed to use it if you are angry.

......

The above is a common statement that uses Items. The first sentence is used in the status bar, the second sentence is used in a single sequence, and the third sentence is used in the menu, today, let's take a look at the usage of Items in these three statements.

The status bar is usually used to display some prompts, usually at the bottom of the form. Since information is displayed, where does this information come from? There are three ways to call the Editor of the status bar Pane: double-click the status bar, right-click to select the Panels Editor, or click "…" on the right of the Panels item of the object monitor. Not seen? When editing, you will find that each row carries a table information. If the text content is used, the text content is displayed in the status, and there is a line number before each line of information, it starts from 0, right: P

However, we sometimes write these prompt messages dynamically, which should be written as follows:

StatusBar1-> Panels-> Items [1]-> Text = "Haha, this will get to know me ";

Why? First, StatusBar1 is the name of the status bar; Panels is the attribute of the status bar. The third method we just mentioned is to call the editor, instead of clicking "…" on the right of the property. So we should write information in it. But where should we write it? So there cannot be no logo for multiple columns. Actually, there is. This is not the Items [], what we want to write is Text content, which is not Text. This is not a mess analysis. You must remember that you can only do this if you want to implement dynamic editing in BCB, because there are few books to illustrate her source J.

The remaining two statements should be well understood. One is to add one in the single-choice grouping box, and the third is to set the first sub-item in the MnEdit menu item to invisible.

Sometimes you should also note that we need to put forward the content of one item in the single-choice grouping box. Will you write it like this?

Label1-> Caption = RadioGroup1-> Items-> Strings [RadioGroup1-> ItemIndex];

In fact, this is correct, but the statements like Label1-> Caption = RadioGroup1-> Items [0]-> Text must be incorrect; of course, if you write Label1-> Caption = RadioGroup1-> Items-> Text in this way, this is correct, but all the content is obtained. This is definitely not what you want :(

You just need to remember that you can only use Items in a single queue, but cannot add row parameters, because we do not see the row number in the editing box, right? J

Can Text be used in menus to access or dynamically name menus? No. When you edit the menu, you will see that the menu name is written in the Caption attribute, so we cannot use Text to complete it :(

Items is excellent, but you must be careful when using it, but don't let this girl lie to J.

I have to watch the women's football Asian Cup. Now the score is one to one, which is shocking. Let's talk about it tomorrow. J

 

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.