VLWEb Dropdown Items (RESOLVED)

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

VLWEb Dropdown Items (RESOLVED)

Post by soa »

Dropdown item has value and caption properties but the documentation example only has

#ddChartType.Items.Add( 'Some Item' )

Is it possible to set the caption property in the same statement?
JamesDuignan
Posts: 85
Joined: Thu Nov 26, 2015 1:43 pm

Re: VLWEb Dropdown Items

Post by JamesDuignan »

Hi Jim,

Yes it is,

Code: Select all

#ddChartType.Items.Add( 'Some Item' 'This is the caption for some item' )
or

Code: Select all

#ddChartType.Items.Add Value( 'Some Item' ) Caption('This is the caption for some item' )
will set the value and caption in a single statement.

Regards,

James
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: VLWEb Dropdown Items

Post by soa »

Simple! Thanks James.
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: VLWEb Dropdown Items (RESOLVED)

Post by soa »

Further. I've added a bunch of items and I want the first to be selected when the drop down is first displayed.

I've tried

#ddChartType.Items.Add Value('MSColumn2D') Caption('2D Bar')
#ddChartType.Items.Add Value('MSColumn3D') Caption('3D Bar')

#ddChartType.Value := 'MSColumn2D'

but the dropdown comes up blank.

How do I do this?
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: VLWEb Dropdown Items (RESOLVED)

Post by soa »

Cancel that last one - I checked it in rather than compile!
Post Reply