Hi,
Thank you for your enquiry.
Does the Listbox have to be populated using variables? Or do you simply want to provide a list of the pages available in the publication?
If you simply want a page list, create a Listbox object on the page, then type the names of each of your pages (as shown in the Organiser pane) into each line of the list box.
Once all pages have been inputted, open the properties of the Listbox and select the
Listbox tab. Enable the
Store Selected Text option, then click the
New button and create a new Publication Variable named
selected with a default blank text value. Click
OK to create the variable and
OK again to confirm the changes.
Now right-click on the Listbox and select
Edit Actions. Select the
Triggers tab,
Mouse group and double-click on the
Left Mouse Click trigger to apply it.
We could now add a long chain of If/Else statements which check to see if the
selected variable equals "Page 1", "Page 2", "Page 3", etc., followed by Go To Page actions to take the user to the corresponding page, but this would be as laborious as it sounds. As we have used the correct page names in the Listbox we can use a single script action to take the user to the right page.
Select the
Programming tab, open the
Programming group and double-click on the
Script action to apply it. Now type the following into the script panel:
Code:
GotoPage(selected)
Now click
Apply and
OK and preview the publication. Scroll through the Listbox and click on a page name - you should be taken to the selected page.
I have attached a completed example which you can examine should you encounter any problems with this procedure.
Kind regards,