[Pb] differences between object, control, custom class, custom visual, and custom external in Pb

Source: Internet
Author: User

5 types of pb:

Custom class: invisible user-defined classes, such as implementation of function Polymorphism
Standard class: standard invisible control extension class
Custom visual: custom visible class
External Visual: External Visual class, such as ocx Introduction
Standard Visual: PB Standard Visual control Extension

Difference between "Control" and "Object:

In PB, both "Control" and "Object" are classes, except that the former is a visual class, and the latter is a non-visual class, which is called differently. No matter which method is used, for the PB database drawing board, it is all UserObject. you can Insert it into the Window through Insert-Object-UserObject or Insert-Control-UserObject. Of course, this object should be visible. In addition, the insert method is to directly use the mouse Drag through the object tree on the left side of pb ide. This method can not only insert visible UserObject, you can also insert invisible classes (you can use View-Non
Visual object llist to see it)


For the copied code, you can use the following method to identify where the code is inherited:


Double-click the object to observe the style
1: If it is just a DataWindow or other controls, it indicates that the object is inherited from the Standsrt Visual;
2: If it is a combination of multiple controls, it indicates that it is inherited from Custom Visual
3: If it is a control that does not exist in PB, it means it may be inherited from External Visual
4: if it does not have the Layout View, it indicates that it inherits from the Custom Class.
5: If the LayOut View has no controls, it indicates that it inherits from Standard Class.

Another way is to right-click the object and select Edit source to check its declaration. Global Type XXX from YYY and YYY are the type of the ancestor.

In general, from the horizontal and vertical aspects:

Horizontal -- standard, custom

Vertical -- visual, nonvisual

Since it is a standard, there are Pb-level basic control events, attributes, etc. On the contrary, custom has to customize many events and attributes.

Speculative check code:

Select Edit source and check its declaration. Global Type XXX from YYY and YYY are the type of the ancestor.

If it is external visual, you can see the following code:

Global Type B from userobject
Integer breadth = 288
Integer Height = 168
Userobjects objecttype = externalvisual!

External: libray is generally used.

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.