Page 1 of 1

VLWEb Dropdown Items (RESOLVED)

Posted: Tue Aug 27, 2019 8:59 am
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?

Re: VLWEb Dropdown Items

Posted: Tue Aug 27, 2019 9:21 am
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

Re: VLWEb Dropdown Items

Posted: Tue Aug 27, 2019 9:22 am
by soa
Simple! Thanks James.

Re: VLWEb Dropdown Items (RESOLVED)

Posted: Tue Aug 27, 2019 10:50 am
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?

Re: VLWEb Dropdown Items (RESOLVED)

Posted: Tue Aug 27, 2019 10:53 am
by soa
Cancel that last one - I checked it in rather than compile!