PowerBuilder--Undisclosed functions

Source: Internet
Author: User

Original:http://blog.csdn.net/happymagic/article/details/51077322

@, a column name (in a string variable) that is known to be a column in a DW to get the DWO of this Column object
The method is:
Dwobject Ldwo_use,ldwo_name
Ldwo_use = Dw_1.object
Ldwo_name = Ldwo_use.__get_attribute ("name", FALSE)
This allows you to manually invoke the ItemChanged event of a number of Windows when setting a value with SetItem () to verify that the value is accepted
int Li_rtn
Li_rtn = Dw_1.event itemchanged (Dw_1.getrow (), Ldwo_name, ' arg1 ')
If Li_rtn = 0 Then
Dw_1.setitem (Dw_1.getrow (), ' name ', ' Arg1 ')
End If


Nested reports in @, non-composite reports cannot be obtained using Getchild, nor can you use describe to get properties and change properties using modify.
You can call the PB not loaded document function to get/change properties, see the example, notice that multiple layers are nested when using loops to get the final object.

Example: A data window control dw_test contains a nested report dw_1,dw_1 a field dept_name.
Dwobject Ldwo_parent,ldwo_obj
String Ls_color
Ldwo_parent = dw_1.o B J e c t
Ldwo_obj = Ldwo_parent.__get_attribute ("Dw_1", false)
Ldwo_obj = ldwo_obj.o B J e c t
Ldwo_obj = Ldwo_obj.__get_attribute ("Dept_name", false)
Ls_color = ldwo_obj.color//Take color
Ldwo_obj.__set_attribute ("Color", RGB (192,192,192))//Change color
__get_attribute (), __get_attribute_item (), __invoke_method (), __set_attribute (), __set_attribute_item ()

PowerBuilder--Undisclosed functions

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.