Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: SQL
Expertise: Beginner
Mar 21, 1997



Application Security Testing: An Integral Part of DevOps

How can I get the display value of a list box?

How can I get the display value of a list box?

In Oracle Power Objects, the Value property of the list box is automatically set to the internal value of the selected entry in the list box. A list box, or popup list or combo box, also displays a value, which can be entirely different, depending on the Translation property ofthe object.

OPO maintains these two values internally with a two column recordset. The first column, with the name DispVal, holds the display value, while the second column, DBVal, holds the actual value.

You can use recordset methods to walk through the recordset and find the row whose second column matches the current Value poroperty of the list box. The first column of this row will contain the displayed value.

The code to bring up a message box with the display value for a list box called lstSample is:

DIM objRecSet As Object

objRecSet = lstSample.GetRecordset()

nPointer = 0

DO WHILE nPointer < objRecSet.GetRowCount()

       IF objRecSet.GetColVal(2) = lstSample.Value THEN

               EXIT DO


               nPointer = nPointer + 1

       END IF



DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date