PDA

View Full Version : Is this possible with a listbox object?



dthompson16
12-18-2004, 05:03 PM
I would like to create an application that on the 1st page has a list of the titles all the other pages. I would like the user to be able to click on the title of their choice and jump to that page. I have tried putting Page.Jump actions in the Item Data but I can't get it to work. Can a listbox be used for this, or do I have to just put a bunch of buttons on the 1st page with Page.Jumps to the other pages? Thanks. I searched the forum but couldn't find an answer.

TJ_Tigger
12-18-2004, 07:50 PM
Here is one page

http://www.indigorose.com/forums/showthread.php?t=6268

and another

http://www.indigorose.com/forums/showthread.php?t=7172

and another

http://www.indigorose.com/forums/showthread.php?t=8833

and one in the Examples area

http://www.indigorose.com/forums/showthread.php?t=8120

Amazing how many times it has been discussed. I don't know if they go into it or not, but I think you could even use a Page or Application action to enumerate all the page names and populate your listbox automatically.

HTH
Tigg

TJ_Tigger
12-18-2004, 07:54 PM
Here you go, this will work only if your pages are named something that means something to your users.



-- Build a table containing all the pages
tbPages = Application.GetPages();
-- If the table is build correctly then do the following
if tbPages do
-- traverse the table and add each item to the listbox
for index, pagename in tbPages do
ListBox.AddItem("ListBox1", pagename, "");
end
end

Tigg

dthompson16
12-18-2004, 11:32 PM
Thanks, Tigg. This is really helpful for someone who couldn't tell a listbox from a box of Listerine before buying AMS. There is a lot of info in the forum after all...I guess I should have searched for "listbox and page jump" instead of just "listbox". It does appear that it has been a rather frequent question. Perhaps someone who has a lot of experiences using listboxes could put a writeup in the FAQ section. Desmond has a gift for explaining clearly. Maybe he could write a "How Do I use page jumps with listboxes?" Thanks again.

Corey
12-18-2004, 11:36 PM
Desmond has a gift for explaining clearly.

I'll second that motion. For he's a jolly good Desmond.