- DIPANJAN DUTTA
- PowerBuilder
- Monday, 6 May 2019 05:22 AM UTC
Hi All
I have design a SingleLineEdit user object of using Standard visual user object, the of the object is u_textbox. And I am opening this user object [u_textbox] multiple times based on condition in another Custom visual user-object. Now I have to process data on menu click, which entered by user in “SingleLineEdit” or u_textbox. To do that I have declared a loop to identify the control in window menu clicked event. But I am getting same name [u_textbox] for all SingleLineEdit user object. Is there any way to distinguish them? Are PowerBuilder assign any name when I open user object? Otherwise I can’t process them logically. I have share my code in below.
//When I open SingleLineEdit user object
u_textbox l_textbox
u_design_base.OpenUserObject(l_textbox)
//At the time of processing
PowerObject lpo_Object
Integer li_index
SingleLineEdit lsle_TextBox
w_output lw_dsign
lw_dsign = Parent.ParentWindow
//Run a loop with list of Control
For li_index = 1 to UpperBound(lw_dsign.uo_design.Control)
lpo_Object = lw_dsign.uo_design.control[li_index]
//Identify only Single Line Edit
If lpo_Object.TypeOf() = SingleLineEdit! Then
lsle_TextBox = lpo_Object
MessageBox("ControlName", lsle_TextBox.classname( ) ) // name of all SingleLineEdit display u_textbox
//Processing with values
End If
Next
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.